Prevent webpack generate `.LICENSE` file when minify (#6737)
* check build result * list dist file * Update build script * restore ci script [skip ci]master
parent
f0ddd0e5b6
commit
b5a201b0ae
|
@ -99,7 +99,7 @@ async function run(params) {
|
|||
await execa("rm", ["-rf", ".cache"]);
|
||||
}
|
||||
|
||||
const bundleCache = new Cache(".cache/", "v17");
|
||||
const bundleCache = new Cache(".cache/", "v18");
|
||||
await bundleCache.load();
|
||||
|
||||
console.log(chalk.inverse(" Building packages "));
|
||||
|
|
|
@ -186,11 +186,7 @@ function getWebpackConfig(bundle) {
|
|||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
config.optimization = {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: bundle.terserOptions
|
||||
})
|
||||
]
|
||||
minimizer: [new TerserPlugin(bundle.terserOptions)]
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -73,10 +73,14 @@ const parsers = [
|
|||
target: "universal",
|
||||
// postcss has dependency cycles that don't work with rollup
|
||||
bundler: "webpack",
|
||||
// postcss need keep_fnames when minify
|
||||
terserOptions: {
|
||||
mangle: {
|
||||
keep_fnames: true
|
||||
// prevent terser generate extra .LICENSE file
|
||||
extractComments: false,
|
||||
terserOptions: {
|
||||
mangle: {
|
||||
// postcss need keep_fnames when minify
|
||||
keep_fnames: true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue