forked from martin-pabst/SQL-IDE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
38 lines (36 loc) · 1.19 KB
/
vite.config.js
File metadata and controls
38 lines (36 loc) · 1.19 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
import { resolve } from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
server:{
proxy:{
'/servlet': 'http://localhost:6500',
'/servlet/websocket': {target: 'ws://localhost:6500', ws: true},
'/servlet/pushWebsocket': {target: 'ws://localhost:6500', ws: true},
'/worker': {
rewrite: (path) => path.replace('/worker', '/dist/worker'),
target: "http://localhost:4000"
}
}
},
build: {
sourcemap: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
'sqljs-worker': './src/client/sqljs-worker/sqljsWorker.ts'
},
output: {
entryFileNames: assetInfo => {
if(assetInfo.name.indexOf('worker') >= 0){
return 'worker/[name].js';
}
return '[name]-[hash].js';
},
assetFileNames: assetInfo => assetInfo.name.endsWith('css') ? '[name]-[hash][extname]' : 'assets/[name]-[hash][extname]',
chunkFileNames: 'assets/js/[name]-[hash].js',
manualChunks: {}
}
},
chunkSizeWarningLimit: 4912
}
});