Skip to content

Commit 41c08e3

Browse files
authoredNov 29, 2022
fix: compatibility with webpack cache (#122)
1 parent fb08e81 commit 41c08e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ function execute(code, loaderContext) {
1010

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.