Skip to content

Commit

Permalink
feat(ModuleImporter): implement import module compatible with bundlers
Browse files Browse the repository at this point in the history
Fixed a flipped condition, which would include exactly the wrong modules when using the ModuleImporter with Webpack.
  • Loading branch information
nrauschcom committed Oct 3, 2021
1 parent 9488a23 commit 0d3e31b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/ModuleImporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ModuleImporter extends null {
const files = context
.keys()
// We have all files in our context, so now we filter the files in the correct directory
.filter(file => !path.normalize(file).startsWith(pathToDirectory));
.filter(file => path.normalize(file).startsWith(pathToDirectory));

return new Map(files.map(file => [file, () => context(file)]));
}
Expand Down

0 comments on commit 0d3e31b

Please sign in to comment.