-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
50 lines (48 loc) · 1.04 KB
/
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
45
46
47
48
49
50
/**
* This is the default vite.config.js file. Feel free to make changes as required
*/
import path, { resolve } from 'path';
import tsconfigPaths from 'vite-tsconfig-paths';
import react from '@vitejs/plugin-react';
module.exports = {
plugins: [
tsconfigPaths(),
react({
include: '**/*.disabled',
}),
],
root: resolve('./dirt_fe_react'),
base: '/static/',
server: {
host: '127.0.0.1',
port: 3000,
open: false,
watch: {
usePolling: true,
disableGlobbing: false,
},
},
resolve: {
alias: {
'~': path.resolve(__dirname, './dirt_fe_react/src'),
},
extensions: ['.js', '.json', '.ts', '.tsx'],
},
build: {
outDir: resolve('./static/dist/js'),
assetsDir: '',
manifest: true,
emptyOutDir: true,
target: 'es2015',
rollupOptions: {
input: {
main: resolve('./dirt_fe_react/src/main.tsx'),
},
output: {
chunkFileNames: '[name].js',
entryFileNames: `[name].js`,
assetFileNames: `[name].[ext]`,
},
},
},
};