title: How do I generate sourcemaps for nextjs?
body: <p>I'm using Next.js for my application and I want to generate sourcemaps to inspect bundle sizes. I followed the instructions given on <a href="https://stackoverflow.com/questions/67916628/next-js-how-to-use-source-map-explorer-with-next-js">Next.js: How to use source-map-explorer with Next.js</a></p>
  <p>But I'm getting the following error:</p>
  <pre><code>.next/static/chunks/styles.73849dc0d772a52b5056.js
    Unable to find a source map.
    See https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps
  .next/static/chunks/webpack-2ae0ca3384e062691226.js
    Unable to find a source map.
    See https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps
  .next/static/chunks/webpack-d9a7914a2067f7938722.js
    Unable to find a source map.
    See https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-map
  </code></pre>
  <p>Across all of the .js chunks. Because of some plugin I can't really figure out how to add stuff directly into the <code>module.exports</code> section so instead I have:</p>
  <pre><code>const nextConfig = {
      productionBrowserSourceMaps: true,
      ...
  </code></pre>
  <p>And the <code>withPlugins</code> module I'm using includes the nextConfig at the end.</p>
  <pre><code>  ],
    nextConfig
  )
  </code></pre>
  <p>So not sure if that's what was messing this up or it was something else completely?</p>