Hex
Hex
PD🧩 Plasmo Developers
Created by Hex on 11/9/2024 in #👾extension
Svelte imports not working
Thinking about just dropping svelte and going back to react
7 replies
PD🧩 Plasmo Developers
Created by Hex on 11/9/2024 in #👾extension
Svelte imports not working
does anyone have any experince using Plasmo with svelte shadcn UI
7 replies
PD🧩 Plasmo Developers
Created by Hex on 11/9/2024 in #👾extension
Svelte imports not working
Update like 3 hours later still got it working sort of still issues
7 replies
PD🧩 Plasmo Developers
Created by Hex on 11/9/2024 in #👾extension
Svelte imports not working
tsconfig.json
{
"extends": "plasmo/templates/tsconfig.base",
"exclude": ["node_modules"],
"include": [".plasmo/index.d.ts", "./src/**/*.ts", "./src/**/*.svelte"],
"compilerOptions": {
"baseUrl": ".",
"typeRoots": ["./node_modules/@types", "./src/types"],
"paths": {
"$lib": ["./src/lib"],
"$lib/*": ["./src/lib/*"]
},
"types": ["svelte", "chrome"]
}
}
{
"extends": "plasmo/templates/tsconfig.base",
"exclude": ["node_modules"],
"include": [".plasmo/index.d.ts", "./src/**/*.ts", "./src/**/*.svelte"],
"compilerOptions": {
"baseUrl": ".",
"typeRoots": ["./node_modules/@types", "./src/types"],
"paths": {
"$lib": ["./src/lib"],
"$lib/*": ["./src/lib/*"]
},
"types": ["svelte", "chrome"]
}
}
Components.json

{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "slate"
},
"aliases": {
"components": "src/lib/components",
"utils": "src/lib/utils"
},
"typescript": true
}

{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "slate"
},
"aliases": {
"components": "src/lib/components",
"utils": "src/lib/utils"
},
"typescript": true
}
svelte.config.mjs (I am trying to just use regular svelete not svelte kit. Do I need this?)
import preprocess from "svelte-preprocess"

/**
* This will add autocompletion if you're working with SvelteKit
* https://github.com/sveltejs/svelte-preprocess/blob/main/docs/usage.md
* @type {import('@sveltejs/kit').Config}
*/
const config = {
preprocess: preprocess({
// ...svelte-preprocess options
}),
compilerOptions: {
css: "injected" // this is the default mode
},
kit: {
alias: {
$lib: "src/lib"
}
}
// ...other svelte options
}

export default config
import preprocess from "svelte-preprocess"

/**
* This will add autocompletion if you're working with SvelteKit
* https://github.com/sveltejs/svelte-preprocess/blob/main/docs/usage.md
* @type {import('@sveltejs/kit').Config}
*/
const config = {
preprocess: preprocess({
// ...svelte-preprocess options
}),
compilerOptions: {
css: "injected" // this is the default mode
},
kit: {
alias: {
$lib: "src/lib"
}
}
// ...other svelte options
}

export default config
7 replies