Skip to content

Commit

Permalink
web/vite: split node modules and emojis into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 17, 2024
1 parent 2487c8c commit 8ff5fff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ export default defineConfig({
base: "./",
build: {
target: ["esnext", "firefox128"],
rollupOptions: {
output: {
manualChunks: id => {
if (id.includes("node_modules") && !id.includes("katex")) {
return "vendor"
} else if (id.endsWith("/emoji/data.json")) {
return "emoji"
}
},
},
},
},
plugins: [
react(),
Expand Down

0 comments on commit 8ff5fff

Please sign in to comment.