Skip to content

Commit

Permalink
fix(module-resolver): wrong path separator in glob call (#895)
Browse files Browse the repository at this point in the history
* fix(module-resolver): wrong path separator in glob call

* chore: add comment
  • Loading branch information
Trevor authored Dec 19, 2018
1 parent 860da4f commit 7f1f954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@lwc/module-resolver/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function resolveModulesInDir(fullPathDir, { ignoreFolderName } = {}) {
return glob.sync(MODULE_ENTRY_PATTERN, { cwd: fullPathDir }).reduce((mappings, file) => {
const fileName = path.basename(file, MODULE_EXTENSION);
const rootDir = path.dirname(file);
const rootParts = rootDir.split(path.sep);
// the glob library normalizes paths to forward slashes only - https://github.com/isaacs/node-glob#windows
const rootParts = rootDir.split('/');
const registry = {
entry: path.join(fullPathDir, file),
moduleSpecifier: null,
Expand Down

0 comments on commit 7f1f954

Please sign in to comment.