Add css into the bundle

This commit is contained in:
Adria Navarro 2024-11-29 09:40:16 +01:00
parent 6221922b33
commit 115b1db968
2 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,8 @@
"build": "vite build"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "1.4.0"
"@sveltejs/vite-plugin-svelte": "1.4.0",
"vite-plugin-css-injected-by-js": "3.5.2"
},
"keywords": [
"svelte"

View File

@ -1,6 +1,7 @@
import { defineConfig } from "vite"
import { svelte } from "@sveltejs/vite-plugin-svelte"
import path from "path"
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"
export default defineConfig(({ mode }) => {
const isProduction = mode === "production"
@ -17,6 +18,7 @@ export default defineConfig(({ mode }) => {
svelte({
emitCss: true,
}),
cssInjectedByJsPlugin(),
],
resolve: {
alias: {