-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathvite.config.js
44 lines (43 loc) · 981 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
44
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { resolve } from "path";
import viteRawPlugin from "./vite/vite-raw-plugin.js";
import banner from "vite-plugin-banner";
import pkg from "./package.json";
// https://vitejs.dev/config/
export default defineConfig({
root: "src",
plugins: [
banner({
content:
`/* NightVisionCharts v${pkg.version} | License: MIT\n` +
` © 2022 ChartMaster. All rights reserved */`,
outDir: "../dist",
}),
svelte({
emitCss: false,
}),
viteRawPlugin({
fileRegex: /\.navy$/,
}),
],
server: {
port: 8085,
},
build: {
target: "es2018",
outDir: "../dist",
emptyOutDir: true,
lib: {
entry: resolve(__dirname, "src/index.js"),
name: "NightVision",
fileName: "night-vision",
},
rollupOptions: {
output: {
manualChunks: undefined,
}
},
minify: false,
},
});