This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Description
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 use hidden-source-map for removing sourceMappingURL.
But it doesn't work and sourceMappingURL is still alived because of that options.
So how about remove below lines?
|
for (const plugin of config.plugins) { |
|
if (plugin.constructor.name === 'UglifyJsPlugin') { |
|
plugin.options.sourceMap = true; |
|
break; |
|
} |
|
} |
|
|
|
if (config.optimization && config.optimization.minimizer) { |
|
for (const plugin of config.optimization.minimizer) { |
|
if (plugin.constructor.name === 'TerserPlugin') { |
|
plugin.options.sourceMap = true; |
|
break; |
|
} |
|
} |
|
} |
|
} |