-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathvite.config.js
53 lines (49 loc) · 983 Bytes
/
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
51
52
53
import {
defineConfig
} from 'vite';
const resolver = require('./thing-editor/electron-main/resolver/resolver.js');
const IS_CI_RUN = process.env.IS_CI_RUN === 'true';
export default defineConfig({
json: {
stringify: true,
namedExports: false
},
server: {
hmr: false,
watch: IS_CI_RUN ? {
ignored: [
'**/**'
]
} : {
ignored: [
'**/node_modules/**',
'/**/.tmp/**',
'games/**/debug/**',
'games/**/release/**'
]
},
strictPort: 5173
},
plugins: [
resolver
],
esbuild: {
keepNames: true
},
resolve: {
extensions: [ '.ts', '.js', '.mjs', '.json', '.jsx', '.tsx'],
dedupe: [
'thing-editor/**'
],
preserveSymlinks: true,
alias: {
'libs': __dirname + '/libs',
'games': __dirname + '/games',
'thing-editor': __dirname + '/thing-editor',
'pixi.js': __dirname + '/node_modules/pixi.js/dist/pixi.mjs'
}
},
define: {
SPINE_SRC_PATH: JSON.stringify('/node_modules/pixi-spine/dist/pixi-spine.js')
}
});