Skip to content

Commit 937a2bd

Browse files
authored
[Productifiation] Update vite.config.js - best practices (#434)
* Update vite.config.js * Update vite.config.js * Update vite.config.js * Update vite.config.js
1 parent 6e5ddee commit 937a2bd

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

vite.config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,20 @@ export default defineConfig({
3232
},
3333
optimizeDeps: {
3434
exclude: ['@ffmpeg/ffmpeg', '@ffmpeg/util']
35-
}
35+
},
36+
build: {
37+
minify: 'esbuild',
38+
chunkSizeWarningLimit: 1024,
39+
rollupOptions: {
40+
output: {
41+
manualChunks: { // Chunk splitting for better caching
42+
'vendor': ['vue', 'vue-router', 'pinia'],
43+
'ui': ['@vueuse/core', '@headlessui/vue', '@heroicons/vue'],
44+
},
45+
},
46+
},
47+
},
48+
define: {
49+
__VUE_PROD_DEVTOOLS__: false, // Disable Vue devtools in production
50+
},
3651
});

0 commit comments

Comments
 (0)