-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
42 lines (41 loc) · 1.1 KB
/
Copy pathvite.config.js
File metadata and controls
42 lines (41 loc) · 1.1 KB
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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import obfuscator from 'vite-plugin-javascript-obfuscator';
export default defineConfig({
plugins: [
react(),
obfuscator({
// We only want to obfuscate the production build
include: [/\.js$/, /\.jsx$/],
exclude: [/node_modules/],
apply: 'build',
debugger: true,
controlFlowFlattening: true,
deadCodeInjection: true,
stringArray: true,
rotateStringArray: true,
shuffleStringArray: true,
stringArrayThreshold: 0.75,
}),
],
root: 'src/renderer',
base: './',
build: {
outDir: '../../dist',
emptyOutDir: true,
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src/renderer'),
'@components': path.resolve(__dirname, 'src/renderer/components'),
'@pages': path.resolve(__dirname, 'src/renderer/pages'),
'@store': path.resolve(__dirname, 'src/renderer/store'),
'@styles': path.resolve(__dirname, 'src/renderer/styles'),
},
},
server: {
port: 5173,
strictPort: true,
},
});