Skip to content

Commit

Permalink
fix: monorepo use different cwd (#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 authored Dec 12, 2020
1 parent af7a462 commit cb3ba35
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/web/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ export const createAppWorkerLoader = () => {
const result = super.getEggPaths();
const monorepoRoot = findLernaRoot();
if (monorepoRoot) {
const monorepoEgg = join(monorepoRoot, 'node_modules/egg');
if (existsSync(monorepoEgg)) {
result.push(monorepoEgg);
}
result.push(monorepoRoot);
}

if (process.env.MIDWAY_EGG_PLUGIN_PATH) {
Expand Down Expand Up @@ -158,10 +155,7 @@ export const createAgentWorkerLoader = () => {
const result = super.getEggPaths();
const monorepoRoot = findLernaRoot();
if (monorepoRoot) {
const monorepoEgg = join(monorepoRoot, 'node_modules/egg');
if (existsSync(monorepoEgg)) {
result.push(monorepoEgg);
}
result.push(monorepoRoot);
}

if (process.env.MIDWAY_EGG_PLUGIN_PATH) {
Expand Down

0 comments on commit cb3ba35

Please sign in to comment.