Next.js Discord

Discord Forum

Is there a way to get sourcemaps working?

Unanswered
Golden northern bumble bee posted this in #help-forum
Open in Discord
Golden northern bumble beeOP
I followed a guide to enable sourcemaps in my NextJS project but it didn't change anyting: if I put the debugger instruction anywhere, when browser stops - there is no sources.
I added this to next.config.js
webpack: (config, { dev }) => {
    config.resolve.preferRelative = true
    if (dev) {
      config.devtool = 'source-map'
    }
    return config
  },

0 Replies