react-code-dataset / next.js /docs /01-app /03-api-reference /05-config /01-next-config-js /productionBrowserSourceMaps.mdx
Download next.js/docs/01-app/03-api-reference/05-config/01-next-config-js/productionBrowserSourceMaps.mdx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/docs/01-app/03-api-reference/05-config/01-next-config-js/productionBrowserSourceMaps.mdx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/docs/01-app/03-api-reference/05-config/01-next-config-js/productionBrowserSourceMaps.mdx
-
curl -L -o productionBrowserSourceMaps.mdx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/docs/01-app/03-api-reference/05-config/01-next-config-js/productionBrowserSourceMaps.mdx
1.09 kB
| --- | |
| title: productionBrowserSourceMaps | |
| description: Enables browser source map generation during the production build. | |
| --- | |
| {/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */} | |
| Source Maps are enabled by default during development. During production builds, they are disabled to prevent you leaking your source on the client, unless you specifically opt-in with the configuration flag. | |
| Next.js provides a configuration flag you can use to enable browser source map generation during the production build: | |
| ```js filename="next.config.js" | |
| module.exports = { | |
| productionBrowserSourceMaps: true, | |
| } | |
| ``` | |
| When the `productionBrowserSourceMaps` option is enabled, the source maps will be output in the same directory as the JavaScript files. Next.js will automatically serve these files when requested. | |
| - Adding source maps can increase `next build` time | |
| - Increases memory usage during `next build` | |