Skip to content

Commit

Permalink
Split the JS build chunks to my code, three code and everything else.…
Browse files Browse the repository at this point in the history
… Still triggers the warning but is better.
  • Loading branch information
bananu7 committed Oct 8, 2022
1 parent b65fc3d commit 52bfbfb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,19 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
plugins: [react()],
build: {
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes("node_modules")) {
if (id.includes("three")) {
return "vendor_three";
}
return "vendor";
}
}
},
},
},
})

0 comments on commit 52bfbfb

Please sign in to comment.