-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
50 lines (49 loc) · 1.05 KB
/
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
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import legacy from '@vitejs/plugin-legacy'
import { visualizer } from 'rollup-plugin-visualizer'
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
wasm(),
svelte(),
topLevelAwait(),
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
})
],
server: {
proxy: {
'/audio': {
target: 'http://localhost:9002',
ws: true
},
'/waterfall': {
target: 'http://localhost:9002',
ws: true
},
'/events': {
target: 'http://localhost:9002',
ws: true
},
'/signal': {
target: 'http://localhost:9002',
ws: true
}
}
},
define: {
__filename: JSON.stringify('')
},
build: {
minify: true,
rollupOptions: {
output: {
},
plugins: [visualizer()]
}
}
})