Skip to content

Commit

Permalink
Fix bug when plugin doesn't attach loader to module (issue #87) (#88)
Browse files Browse the repository at this point in the history
* Update version

* Update changelog
  • Loading branch information
artembatura authored Jun 1, 2023
1 parent 906dd70 commit 683858d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.1.0 (2023-06-01)

### Issue [#87](https://github.com/artembatura/modify-source-webpack-plugin/issues/87)

Fixed bug when plugin doesn't attach loader to module and file is not being modified again in watch mode after triggered re-compilation.

## 4.0.0 (2023-02-11)

The main step forward in this release was rejecting a bad approach with global variable which was used to access modify functions from webpack loader.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modify-source-webpack-plugin",
"version": "4.0.1",
"version": "4.1.0",
"description": "Webpack plugin for modifying modules source",
"author": {
"name": "Artem Batura",
Expand Down
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 683858d

Please sign in to comment.