-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathvite.config.js
44 lines (40 loc) · 1.03 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
import { defineConfig } from 'vite';
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [
vue({
template: {
transformAssetUrls: {
includeAbsolute: false,
},
},
}),
],
server: {
proxy: {
/**
* When developing locally - proxies "/api" to the local Colyseus server.
* This mimics the behaviour of the production server.
*/
'/api': {
target: 'http://localhost:2567',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
build: {
rollupOptions: {
output: {
manualChunks: undefined, // Ensure manualChunks is undefined to disable chunking
format: 'iife', // Use 'iife' format for a single self-contained file
entryFileNames: 'assets/index.js',
chunkFileNames: 'assets/[name]-[hash].js',
assetFileNames: 'assets/[name]-[hash].[ext]'
},
},
chunkSizeWarningLimit: 5000,
copyPublicDir: false,
},
})