GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #8573 from hulkish/fix-minimizer-fn · webpack/webpack@69dea22

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • WebpackOptionsApply.js
  • test/configCases/optimization/minimizer
    • index.js
    • webpack.config.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/WebpackOptionsApply.js‎

Copy file name to clipboardExpand all lines: lib/WebpackOptionsApply.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class WebpackOptionsApply extends OptionsApply {
463463
if (options.optimization.minimize) {
464464
for (const minimizer of options.optimization.minimizer) {
465465
if (typeof minimizer === "function") {
466-
minimizer.apply(compiler);
466+
minimizer.call(compiler, compiler);
467467
} else {
468468
minimizer.apply(compiler);
469469
}
Collapse file

‎test/configCases/optimization/minimizer/index.js‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
it("should compile", () => {})
Collapse file

‎test/configCases/optimization/minimizer/webpack.config.js‎

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const Compiler = require('../../../../lib/Compiler');
2+
3+
module.exports = {
4+
optimization: {
5+
minimize: true,
6+
minimizer: [
7+
{
8+
apply(compiler) {
9+
expect(compiler).toBeInstanceOf(Compiler);
10+
},
11+
},
12+
function(compiler) {
13+
expect(compiler).toBe(this);
14+
expect(compiler).toBeInstanceOf(Compiler);
15+
}
16+
],
17+
},
18+
};

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.