Skip to content

Commit 683858d

Browse files
authored
Fix bug when plugin doesn't attach loader to module (issue #87) (#88)
* Update version * Update changelog
1 parent 906dd70 commit 683858d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.1.0 (2023-06-01)
2+
3+
### Issue [#87](https://github.com/artembatura/modify-source-webpack-plugin/issues/87)
4+
5+
Fixed bug when plugin doesn't attach loader to module and file is not being modified again in watch mode after triggered re-compilation.
6+
17
## 4.0.0 (2023-02-11)
28

39
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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modify-source-webpack-plugin",
3-
"version": "4.0.1",
3+
"version": "4.1.0",
44
"description": "Webpack plugin for modifying modules source",
55
"author": {
66
"name": "Artem Batura",

src/ModifySourcePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export class ModifySourcePlugin {
5858
public apply(compiler: Compiler): void {
5959
const { rules, debug, constants = {} } = this.options;
6060

61-
const modifiedModules: (string | number)[] = [];
62-
6361
compiler.hooks.compilation.tap(PLUGIN_NAME, compilation => {
62+
const modifiedModules: (string | number)[] = [];
63+
6464
const tapCallback = (_: any, normalModule: NormalModule) => {
6565
const userRequest = normalModule.userRequest || '';
6666

0 commit comments

Comments
 (0)