Closed ghost closed 3 years ago
@JonAbrams @azizhk @timneutkens How about your thought?
Hi, I haven't quite followed the recent developments to next, why is sourcemap no longer needed? What changed?
I think you can not use this plugin (remove from your next.config.js) and set devtool in next.config.js's webpack function directly to see if things work out for you. If they do and other devtool options work as well, then I'm fine with removing those lines.
Hello @azizhk
I haven't quite followed the recent developments to next, why is sourcemap no longer needed? What changed?
I don't know about previous version but according to #288 maybe sourcemap of common.js
isn't generated.
However in nextjs9(my version), I can see sourcemap of common.js
is generated well. (Please see my capture)
I think you can not use this plugin (remove from your next.config.js) and set devtool in next.config.js's webpack function directly to see if things work out for you.
Yes so I removed and set webpack config directly as you can see in the capture of the issue.
I just want to notice this issue that devtool
options isn't working with this plugin :)
Closing in favor of https://github.com/vercel/next.js/pull/20267
Maybe sourceMap of
common.js
wasn't generated in previous version (#288) So some code(UglifyJsPlugin/TerserPlugin) is added in #296. But in nextjs 9, it seems sourceMap option is no longer needed.Also this two option disturb applying
webpack.devtool
. For example, I usehidden-source-map
for removingsourceMappingURL
. But it doesn't work andsourceMappingURL
is still alived because of that options.So how about remove below lines? https://github.com/vercel/next-plugins/blob/097f28aaf4b6f8542bff374ce6ba4d5bdca6cd58/packages/next-source-maps/index.js#L16-L31