Skip to content

Commit

Permalink
fix: use posix join for package path (#127)
Browse files Browse the repository at this point in the history
Closes:
- #121
  • Loading branch information
killagu committed Jun 28, 2023
1 parent 0788c7d commit 53672f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/common-util/src/ModuleConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export class ModuleConfigUtil {
let moduleReference: ModuleReference;
if (ModuleReferenceConfigHelp.isNpmModuleReference(moduleReferenceConfig)) {
const options = cwd ? { paths: [ cwd ] } : {};
const pkgJson = path.join(moduleReferenceConfig.package, 'package.json');
// path.posix for windows keep path as foo/package.json
const pkgJson = path.posix.join(moduleReferenceConfig.package, 'package.json');
const file = require.resolve(pkgJson, options);
moduleReference = {
path: path.dirname(file),
Expand Down

0 comments on commit 53672f4

Please sign in to comment.