You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tree shaking does not seem to be working when using Next.js 14, 15 with React 18. This issue causes unnecessary bundle size increases and potential performance issues.
Additionally, we would like to request support for React 19 in future releases.
Tree shaking should properly remove unused code when using Next.js 14, 15.
React 19 should be officially supported.
Actual behavior
Unused components and utilities are not being eliminated during build time.
Performance may be affected due to larger bundle sizes.
Steps to reproduce
Set up a new Next.js 14 or 15 project with React 18.
Install @shopify/polaris and import specific components.
Check the final bundle size with Webpack.
Observe that tree shaking is not working as expected.
If relevant, provide code snippets or configurations.
Are you using React components?
None
Polaris version number
No response
Browser
No response
Device
No response
The text was updated successfully, but these errors were encountered:
Summary
Tree shaking does not seem to be working when using Next.js 14, 15 with React 18. This issue causes unnecessary bundle size increases and potential performance issues.
Additionally, we would like to request support for React 19 in future releases.
Next.js Version: 14.2.24 / 15.1.7
React Version: 18.2.0
Polaris Version: 13.9.2 (latest)
Build Tool: Webpack 5.97.1
Expected behavior
Tree shaking should properly remove unused code when using Next.js 14, 15.
React 19 should be officially supported.
Actual behavior
Unused components and utilities are not being eliminated during build time.
Performance may be affected due to larger bundle sizes.
Steps to reproduce
Set up a new Next.js 14 or 15 project with React 18.
Install @shopify/polaris and import specific components.
Check the final bundle size with Webpack.
Observe that tree shaking is not working as expected.
If relevant, provide code snippets or configurations.
Are you using React components?
None
Polaris version number
No response
Browser
No response
Device
No response
The text was updated successfully, but these errors were encountered: