-
Notifications
You must be signed in to change notification settings - Fork 40
/
vite.config.ts
39 lines (37 loc) · 1.01 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
import { resolve } from "path";
import obfuscator from "rollup-plugin-obfuscator";
import { defineConfig } from "vite";
const root = resolve(__dirname, "src");
const outDir = resolve(__dirname, "dist");
export default defineConfig({
root,
publicDir: resolve(__dirname, "public"),
build: {
outDir,
emptyOutDir: true,
rollupOptions: {
plugins: [
obfuscator({
fileOptions: {
compact: true,
controlFlowFlattening: true,
deadCodeInjection: true,
disableConsoleOutput: true,
renameGlobals: true,
rotateStringArray: true,
shuffleStringArray: true,
splitStrings: true,
splitStringsChunkLength: 5,
stringArray: true,
transformObjectKeys: true,
},
}),
],
input: {
main: resolve(root, "index.html"),
about: resolve(root, "about", "index.html"),
iframe: resolve(root, "iframe", "index.html"),
},
},
},
});