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

devtool option isn't working with useSourceMap #674

@ghost

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.

image

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;
}
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions