Skip to content

Commit

Permalink
fix(cli): window下路径分隔符\转换为/
Browse files Browse the repository at this point in the history
fix #286
  • Loading branch information
roymondchen authored and jia000 committed Aug 18, 2022
1 parent 8f8d6ba commit 4e4cae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/utils/resolveAppPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const resolveAppPackages = (app: App) => {

if (!moduleName) throw Error('packages中包含非法配置');

const indexPath = execSync(`node -e "console.log(require.resolve('${moduleName}'))"`, { cwd })
const indexPath = execSync(`node -e "console.log(require.resolve('${moduleName.replace(/\\/g, '/')}'))"`, { cwd })
.toString()
.replace('\n', '');
const indexCode = fs.readFileSync(indexPath, { encoding: 'utf-8', flag: 'r' });
Expand Down

0 comments on commit 4e4cae4

Please sign in to comment.