Skip to content

Commit e86b825

Browse files
author
chengyu.chengyulia
committed
fix: get plugins
1 parent 3b91566 commit e86b825

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/utils/plugins.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,15 @@ async function getPriPlugins(pluginRootPath: string, packageJsonPaths: string[])
174174
return;
175175
}
176176

177-
for (const eachPackage of globalState.plugins) {
178-
const distPath = path.join(globalState.projectRootPath, tempPath.dir, 'plugins', eachPackage.name);
179-
await spinner(`Build plugin ${eachPackage.name}`, async () => {
180-
await fs.remove(distPath);
181-
await buildPluginSource(eachPackage.rootPath, distPath);
182-
});
183-
addPluginFromEntry(distPath);
177+
if (pluginRootPath === globalState.projectRootPath) {
178+
for (const eachPackage of globalState.plugins) {
179+
const distPath = path.join(globalState.projectRootPath, tempPath.dir, 'plugins', eachPackage.name);
180+
await spinner(`Build plugin ${eachPackage.name}`, async () => {
181+
await fs.remove(distPath);
182+
await buildPluginSource(eachPackage.rootPath, distPath);
183+
});
184+
addPluginFromEntry(distPath);
185+
}
184186
}
185187

186188
const deps = packageJsonPaths.map(packageJsonPath => {

0 commit comments

Comments
 (0)