Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 802 Bytes

source-maps.md

File metadata and controls

23 lines (16 loc) · 802 Bytes
description
Enables browser source map generation during the production build.

Source Maps

Source Maps are enabled by default during development. During production builds they are disabled as generation source maps can significantly increase build times and memory usage while being generated.

Next.js provides a configuration flag you can use to enable browser source map generation during the production build:

// 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.

Caveats

  • Can increase next build time
  • Increases memory usage during next build