30da48fcd2
This PR will enable minifying the *server* part of the user code by default when running `next build`. ## Explanation Next.js compiles two versions of your code: the client version for the app that runs in the browser, and the server for the code that will run on the server. Whilst the client code has always been minified and optimised, we haven't done so historically for the server side. ## How does this impact me? There are several consequences to this change: - minified code makes error stacks less readable. To fix that, you can use source maps, which you can enable with `experimental.serverSourceMaps`. This is not enabled by default as this is an expensive operation. - however the server code will be optimised for size so as a result, cold boots should improve ## opting out you can opt out via specifying `experimental.serverMinification: false` in `next.config.js` |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-config-next | ||
eslint-plugin-next | ||
font | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-env | ||
next-mdx | ||
next-plugin-storybook | ||
next-polyfill-module | ||
next-polyfill-nomodule | ||
next-swc | ||
react-dev-overlay | ||
react-refresh-utils | ||
third-parties |