Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6feeda0

Browse files
chore: add changelog entry (#677)
1 parent dd360be commit 6feeda0

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

.changeset/rename-plugin-name.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"minimizer-webpack-plugin": minor
3+
---
4+
5+
terser-webpack-plugin has been renamed to minimizer-webpack-plugin, merging other minimizers from css-minimizer-webpack-plugin and html-minimizer-webpack-plugin. We will continue to publish new releases under the old name, but we recommend switching to the new package - minimizer-webpack-plugin. It is now a single plugin for minification. We also added the ability to specify different minifier types using only one plugin instance, which will improve performance.

test/TerserPlugin.test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,9 +563,15 @@ describe("MinimizerPlugin", () => {
563563
expect(MinimizerPlugin.isSourceMap({ version: 3 })).toBe(false);
564564
expect(MinimizerPlugin.isSourceMap({ sources: "" })).toBe(false);
565565
expect(MinimizerPlugin.isSourceMap({ mappings: [] })).toBe(false);
566-
expect(MinimizerPlugin.isSourceMap({ version: 3, sources: "" })).toBe(false);
567-
expect(MinimizerPlugin.isSourceMap({ version: 3, mappings: [] })).toBe(false);
568-
expect(MinimizerPlugin.isSourceMap({ sources: "", mappings: [] })).toBe(false);
566+
expect(MinimizerPlugin.isSourceMap({ version: 3, sources: "" })).toBe(
567+
false,
568+
);
569+
expect(MinimizerPlugin.isSourceMap({ version: 3, mappings: [] })).toBe(
570+
false,
571+
);
572+
expect(MinimizerPlugin.isSourceMap({ sources: "", mappings: [] })).toBe(
573+
false,
574+
);
569575
expect(
570576
MinimizerPlugin.isSourceMap({ version: 3, sources: "", mappings: [] }),
571577
).toBe(false);

test/minify-option.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,10 @@ describe("minify option", () => {
13091309

13101310
new MinimizerPlugin({
13111311
test: /\.(?:[cm]?js|html?)(\?.*)?$/i,
1312-
minify: [MinimizerPlugin.terserMinify, MinimizerPlugin.htmlMinifierTerser],
1312+
minify: [
1313+
MinimizerPlugin.terserMinify,
1314+
MinimizerPlugin.htmlMinifierTerser,
1315+
],
13131316
}).apply(compiler);
13141317

13151318
const stats = await compile(compiler);

0 commit comments

Comments
 (0)