mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
parent
8f8d6ba420
commit
4e4cae4a77
@ -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' });
|
||||
|
Loading…
x
Reference in New Issue
Block a user