-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.js
More file actions
48 lines (47 loc) · 1.04 KB
/
vite.config.js
File metadata and controls
48 lines (47 loc) · 1.04 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
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { AppConfig } from './src/config/AppConfig.js'
// https://vitejs.dev/config/
const testDeps =
process.env.NODE_ENV === 'development'
? [
'@testing-library/react',
'@testing-library/user-event',
'chai',
'@johanblumenberg/ts-mockito'
]
: []
export default defineConfig({
server: {
host: true,
port: 9001
},
base: `./`,
optimizeDeps: {
include: testDeps,
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
additionalData: '@root-entry-name: default;',
},
},
},
build: {
outDir: AppConfig.applicationName,
// sourcemap: 'inline',
sourcemap: true,
minify: false,
rollupOptions: {
input: ['./index.html'],
onLog(level, log, handler) {
if (log.cause && log.cause.message === `Can't resolve original location of error.`) {
return
}
handler(level, log)
}
}
},
plugins: [react()]
})