-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 1.1 KB
/
Copy pathvite.config.ts
File metadata and controls
35 lines (34 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
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// https://vite.dev/config/
export default defineConfig({
base: '/',
plugins: [react()],
resolve: {
tsconfigPaths: true,
},
build: {
sourcemap: false,
rollupOptions: {
input: {
main: './index.html', // Original entry
'404': './404.html', // Add 404 as second entry
},
output: {
// NOTE: manualChunks disabled for now. There is an issue related to it.
// manualChunks: (id) => {
// if (id.includes('node_modules')) {
// const start = id.indexOf('node_modules');
// if (id.includes('react', start)) return 'react-vendor';
// if (id.includes('@mui', start) || id.includes('@emotion', start)) return 'mui-vendor';
// if (id.includes('i18next', start)) return 'i18n-vendor';
// return 'vendor';
// }
// },
chunkFileNames: 'chunks/[name].[hash].js',
entryFileNames: 'entries/[name].[hash].js',
assetFileNames: 'assets/[name].[hash].[ext]',
}
}
}
});