-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.ts
50 lines (50 loc) · 1.19 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { visualizer } from "rollup-plugin-visualizer";
import b from 'vite-plugin-banner'
import constants from './src/typescript/constants'
import preprocess from 'svelte-preprocess'
import type { UserConfig } from "vite";
const config: UserConfig = {
plugins: [
svelte({
preprocess: preprocess()
}),
b(constants.banner),
visualizer({
emitFile: true,
template: "sunburst",
filename: "stats.html",
})
],
appType: "mpa",
base: "/",
css: {
devSourcemap: true,
},
build: {
target: "es2017",
emptyOutDir: false,
cssCodeSplit: true,
sourcemap: false,
minify: "esbuild",
rollupOptions: {
treeshake: "recommended",
input: {
index: "index.html",
fourHundredFour: "./404.html",
fiveHundred: "./500.html",
login: "./login.html",
signUp: "./signUp.html",
share: "./share.html",
list: "./list.html",
credits: "./credits.html",
leaderboard: "./leaderboard.html",
// DMV1: './dmv1.html',
},
output: {
dir: "out",
},
},
},
};
export default config