mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-03 16:26:40 +08:00
parent
8f8d6ba420
commit
4e4cae4a77
@ -34,7 +34,7 @@ export const resolveAppPackages = (app: App) => {
|
|||||||
|
|
||||||
if (!moduleName) throw Error('packages中包含非法配置');
|
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()
|
.toString()
|
||||||
.replace('\n', '');
|
.replace('\n', '');
|
||||||
const indexCode = fs.readFileSync(indexPath, { encoding: 'utf-8', flag: 'r' });
|
const indexCode = fs.readFileSync(indexPath, { encoding: 'utf-8', flag: 'r' });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user