forked from nosovk/symfony-vite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (37 loc) · 963 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { default as symfonyPlugin } from "vite-plugin-symfony";
import sveltePreprocess from "svelte-preprocess";
export default defineConfig({
plugins: [
svelte({
preprocess: sveltePreprocess({
postcss: true,
scss: {
prependData: '@use "assets/variables.scss" as *;',
},
}),
compilerOptions: {
customElement: true,
},
emitCss: true,
}),
symfonyPlugin.default({
refresh: ["templates/**/*.twig"],
}),
],
build: {
rollupOptions: {
input: {
app: "./assets/app.ts",
mobileStyles: "./assets/scss/mobile.scss",
desktopStyles: "./assets/scss/desktop.scss",
printStyles: "./assets/scss/print.scss",
webComponents: "./assets/entrypoints/web-components.ts",
},
},
},
server: {
origin: "http://localhost:5173", // this used in dev env to determine which origin to inline for static assets
},
});