-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
43 lines (40 loc) · 980 Bytes
/
vite.config.js
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
39
40
41
42
43
import {resolve} from 'path';
import {svelte} from '@sveltejs/vite-plugin-svelte'
import {defineConfig} from "vite";
let static_url = "/loc_assets/dist";
if ( process.env.NODE_ENV == "development" ) {
static_url = "/assets/"
}
export default defineConfig({
plugins: [
svelte()
],
root: resolve('./assets'),
base: static_url,
server: {
host: 'localhost',
port: 5173,
open: false,
watch: {
usePolling: true,
disableGlobbing: false,
},
},
resolve: {
extensions: ['.js', '.json', '.svelte', '.ts', '.tsx', '.jsx'],
},
build: {
outDir: resolve('./loc_assets/dist'),
assetsDir: '',
manifest: true,
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve('./assets/main.js'),
},
output: {
chunkFileNames: undefined,
},
},
},
});