-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
29 lines (28 loc) · 987 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
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
// additional asset types
assetsInclude: ['**/*.gltf', '**/*.glb', '**/*.m4a', '**/*.hdr'],
build: {
target: ['es2022'],
chunkSizeWarningLimit: 900,
rollupOptions: {
output: {
// chunking and dependency size observability
manualChunks: (id) => {
// create chunk for playcanvas extras deps.
if (id.includes('extras') || id.includes('mini-stats')) {
return 'extras';
}
// create chunk for playcanvas engine deps.
if (
id.includes('node_modules/playcanvas') ||
id.includes('node_modules/@playcanvas')
) {
return 'engine';
}
}
}
}
}
});