Skip to content

Commit

Permalink
Fix bug when plugin doesn't attach loader to module (issue #87)
Browse files Browse the repository at this point in the history
  • Loading branch information
artembatura committed Jun 1, 2023
1 parent 906dd70 commit ab05227
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ModifySourcePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export class ModifySourcePlugin {
public apply(compiler: Compiler): void {
const { rules, debug, constants = {} } = this.options;

const modifiedModules: (string | number)[] = [];

compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
const modifiedModules: (string | number)[] = [];

const tapCallback = (_: any, normalModule: NormalModule) => {
const userRequest = normalModule.userRequest || '';

Expand Down

0 comments on commit ab05227

Please sign in to comment.