Skip to content

Commit

Permalink
fix: compatibility with webpack cache (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Nov 29, 2022
1 parent fb08e81 commit 41c08e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function execute(code, loaderContext) {

// eslint-disable-next-line no-underscore-dangle
module.paths = Module._nodeModulePaths(loaderContext.context);
module.filename = loaderContext.resource;
// Use the path without webpack-specific parts (`resourceQuery` or `resourceFragment`)
module.filename = loaderContext.resourcePath;

// eslint-disable-next-line no-underscore-dangle
module._compile(code, loaderContext.resource);
Expand Down

0 comments on commit 41c08e3

Please sign in to comment.