-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
36 lines (35 loc) · 1.15 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
import react from '@vitejs/plugin-react';
import * as path from 'path';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
},
define: {
'process.env': {},
},
resolve: {
alias: {
'@procosys/core': path.resolve(__dirname, 'src/core/'),
'@procosys/modules': path.resolve(__dirname, 'src/modules/'),
'@procosys/hooks': path.resolve(__dirname, 'src/hooks/'),
'@procosys/components': path.resolve(__dirname, 'src/components/'),
'@procosys/assets': path.resolve(__dirname, 'src/assets/'),
'@procosys/http': path.resolve(__dirname, 'src/http/'),
'@procosys/util': path.resolve(__dirname, 'src/util/'),
},
},
build: {
commonjsOptions: {
transformMixedEsModules: true,
},
rollupOptions: {
output: {
assetFileNames: 'v2-assets/[name]-[hash][extname]',
entryFileNames: 'v2-assets/[name]-[hash].js',
chunkFileNames: 'v2-assets/[name]-[hash].js',
},
},
},
});