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 #8405 from xiaoxiaojx/fix-function-plugin-apply · webpack/webpack@e3e8a68

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • declarations
    • WebpackOptions.d.ts
  • lib
    • webpack.js
  • schemas
    • WebpackOptions.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎declarations/WebpackOptions.d.ts‎

Copy file name to clipboardExpand all lines: declarations/WebpackOptions.d.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export type ArrayOfStringOrStringArrayValues = (string | string[])[];
225225
* via the `definition` "WebpackPluginFunction".
226226
*/
227227
export type WebpackPluginFunction = (
228+
this: import("../lib/Compiler"),
228229
compiler: import("../lib/Compiler")
229230
) => void;
230231
/**
Collapse file

‎lib/webpack.js‎

Copy file name to clipboardExpand all lines: lib/webpack.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const webpack = (options, callback) => {
4242
if (options.plugins && Array.isArray(options.plugins)) {
4343
for (const plugin of options.plugins) {
4444
if (typeof plugin === "function") {
45-
plugin.apply(compiler);
45+
plugin.call(compiler, compiler);
4646
} else {
4747
plugin.apply(compiler);
4848
}
Collapse file

‎schemas/WebpackOptions.json‎

Copy file name to clipboardExpand all lines: schemas/WebpackOptions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@
18791879
"WebpackPluginFunction": {
18801880
"description": "Function acting as plugin",
18811881
"instanceof": "Function",
1882-
"tsType": "(compiler: import('../lib/Compiler')) => void"
1882+
"tsType": "(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void"
18831883
},
18841884
"WebpackPluginInstance": {
18851885
"description": "Plugin instance",

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.