Skip to content

Commit

Permalink
chore: disable auto load in js mode
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Mar 6, 2019
1 parent 8cd24b8 commit 16faf54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/midway-core/src/loader.ts
Expand Up @@ -57,6 +57,11 @@ export class ContainerLoader {
ignore?: string;
configLocations?: string[];
} = {}) {
if (!this.isTsMode && loadOpts.disableAutoLoad === undefined) {
// disable auto load in js mode by default
loadOpts.disableAutoLoad = true;
}

// 濡傛灉娌℃湁鍏抽棴autoLoad 鍒欒繘琛宭oad
if (!loadOpts.disableAutoLoad) {
const defaultLoadDir = this.isTsMode ? [this.baseDir] : ['app', 'lib'];
Expand Down

0 comments on commit 16faf54

Please sign in to comment.