Skip to content

Commit

Permalink
add module argument to DefinePlugin.runtimeValue functions
Browse files Browse the repository at this point in the history
PR #6793 added the ability for DefinePlugin to use function that return values.
This PR just add the ability to these functions to access the module being parsed (see #8301).
eg.
```
  webpack.DefinePlugin.runtimeValue(module => module.resource ....)
```
  • Loading branch information
FranckFreiburger committed Oct 30, 2018
1 parent 7076c05 commit 2b0025a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DefinePlugin.js
Expand Up @@ -29,7 +29,7 @@ class RuntimeValue {
}
}

return this.fn();
return this.fn(parser.state.module);
}
}

Expand Down

0 comments on commit 2b0025a

Please sign in to comment.