Revert "Use gulp-terser instead of webpack-terser (#5788)" (#5796)

This commit is contained in:
Paulus Schoutsen
2020-05-07 09:28:51 -07:00
committed by GitHub
parent 5084cde6b9
commit b69d5e0fa3
8 changed files with 15 additions and 97 deletions

View File

@@ -29,7 +29,7 @@ const createWebpackConfig = ({
}
return {
mode: isProdBuild ? "production" : "development",
devtool: isProdBuild ? undefined : "inline-cheap-module-source-map",
devtool: isProdBuild ? "source-map" : "inline-cheap-module-source-map",
entry,
module: {
rules: [
@@ -54,18 +54,17 @@ const createWebpackConfig = ({
},
optimization: {
minimizer: [
// We minify in gulp. Only minify if we look at stats.
isStatsBuild &&
new TerserPlugin({
cache: true,
parallel: true,
extractComments: true,
terserOptions: {
safari10: true,
ecma: latestBuild ? undefined : 5,
},
}),
].filter(Boolean),
new TerserPlugin({
cache: true,
parallel: true,
extractComments: true,
sourceMap: true,
terserOptions: {
safari10: true,
ecma: latestBuild ? undefined : 5,
},
}),
],
},
plugins: [
new ManifestPlugin(),