Skip to content

Commit

Permalink
fix:path may not find when use lerna
Browse files Browse the repository at this point in the history
当使用lerna 将nodemodule提取到根目录时,该插件调用的nodemodule的位置如果没有存在nodemodule文件夹则会报错,所以使用相对路径找到该插件所安装位置确保肯定存在nodemodule
  • Loading branch information
yehuozhili committed May 19, 2021
1 parent c7b5e4c commit 6246b3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function (api: IApi) {
}
const { cwd, absOutputPath, absNodeModulesPath } = api.paths;
const outputPath = absOutputPath;
const themeTemp = winPath(join(absNodeModulesPath, '.plugin-theme'));
const themeTemp = winPath(join(__dirname, '../../.plugin-theme'));

// 增加中间件
api.addMiddewares(() => {
Expand Down

0 comments on commit 6246b3f

Please sign in to comment.