Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
[web] Improve bundle chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijonson committed Jul 16, 2023
1 parent 8c3a135 commit f3d6279
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/changelog/v4-4-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const v4_4_1: ChangelogEntry = {
items: [
"Further improved state management",
"Reduced initial bundle size",
"Update app dependencies",
"Updated all project dependencies",
],
},
],
Expand Down
35 changes: 35 additions & 0 deletions packages/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,41 @@ export default defineConfig({
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
build: {
rollupOptions: {
output: {
manualChunks: {
"mantine-core": [
"@mantine/core",
"@mantine/hooks",
"@emotion/react",
],
"mantine-dropzone": ["@mantine/dropzone"],
"mantine-form": ["@mantine/form"],
"mantine-modals": ["@mantine/modals"],
"mantine-notifications": ["@mantine/notifications"],
"mantine-prism": ["@mantine/prism"],
"mantine-tiptap": [
"@tiptap/extension-code-block-lowlight",
"@tiptap/extension-link",
"@tiptap/react",
"@tiptap/starter-kit",
"@mantine/tiptap",
"@tabler/icons-react",
"lowlight",
],
"gpt-turbo": ["gpt-turbo"],
react: ["react"],
"react-dom": ["react-dom"],
"react-icons": ["react-icons"],
"react-router-dom": ["react-router-dom"],
uuid: ["uuid"],
zod: ["zod"],
zustand: ["zustand"],
},
},
},
},
server: {
port: 3000,
host: true,
Expand Down

0 comments on commit f3d6279

Please sign in to comment.