mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-26 01:25:05 +02:00
⚡️(frontend) improve bundle size
Improve bundle size by improving tree shaking and code splitting.
This commit is contained in:
@@ -15,6 +15,12 @@ const nextConfig = {
|
||||
// Enables the styled-components SWC transform
|
||||
styledComponents: true,
|
||||
},
|
||||
experimental: {
|
||||
// Tree-shake barrel files for these packages so webpack only bundles the
|
||||
// symbols that are actually imported, reducing chunk sizes noticeably for
|
||||
// Mantine and the Cunningham design system.
|
||||
optimizePackageImports: ['@mantine/core', '@mantine/hooks', 'lodash'],
|
||||
},
|
||||
generateBuildId: () => buildId,
|
||||
env: {
|
||||
NEXT_PUBLIC_BUILD_ID: buildId,
|
||||
|
||||
Reference in New Issue
Block a user