-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathvite.config.ts
More file actions
58 lines (57 loc) · 1.39 KB
/
vite.config.ts
File metadata and controls
58 lines (57 loc) · 1.39 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { defineConfig } from 'vite'
import { resolve } from 'node:path'
import angular from '@analogjs/vite-plugin-angular';
export default defineConfig({
root: 'src',
base: '/',
publicDir: '../static',
plugins: [
angular({
tsconfig: resolve(__dirname, './tsconfig.json'),
}),
],
build: {
outDir: '../dist',
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'src/index.html'),
},
external: ['@angular/compiler'],
},
},
server: {
port: 8200,
open: true,
cors: true
},
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@app': resolve(__dirname, 'src/app'),
'@assets': resolve(__dirname, 'src/assets'),
'@components': resolve(__dirname, 'src/components'),
'@utils': resolve(__dirname, 'src/utils')
},
extensions: ['.ts', '.js', '.json', '.less', '.css']
},
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
},
optimizeDeps: {
include: [
'@angular/core',
'@angular/platform-browser-dynamic',
'@angular/common',
'@angular/router',
'@angular/forms',
'rxjs',
'rxjs/operators',
'date-fns',
// './app/charts/chart.module',
// './app/systemlogs/systemlog.module',
// './app/doubleball/doubleball.module',
// './app/demos/demos.module',
],
},
})