enablePrerenderSourceMaps
Enable source maps for errors during prerendering in next build.
The enablePrerenderSourceMaps option lets Node.js use existing source maps during the prerender phase of next build. When source maps are available, error stack traces point to the original source code. It defaults to true.
This option does not generate source maps. Webpack does not generate server source maps by default. To generate them when investigating prerender errors, use next build --debug-prerender.
To disable it, set enablePrerenderSourceMaps to false:
Reference
| Option | Type | Default |
|---|---|---|
enablePrerenderSourceMaps | boolean | true |
Disabling source maps during prerendering can reduce build memory usage, but makes prerendering errors harder to debug.
Version History
| Version | Changes |
|---|---|
v16.3.0 | The default changed to true, regardless of whether cacheComponents is enabled. |
v16.0.0 | enablePrerenderSourceMaps moved from experimental.enablePrerenderSourceMaps to the top-level enablePrerenderSourceMaps option. |