Skip to content

Commit

Permalink
Merge pull request #486 from midwayjs/egg_ts_mode_support
Browse files Browse the repository at this point in the history
chore: add egg ts mode flag
  • Loading branch information
kurten committed May 8, 2020
2 parents dea4b92 + 8935d87 commit 0b6793c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/midway-web/src/loader/webLoader.ts
Expand Up @@ -42,7 +42,8 @@ export class MidwayWebLoader extends EggLoader {
* 判断是否是 ts 模式,在构造器内就会被执行
*/
get isTsMode(): boolean {
return !!this.app.options.typescript;
// if egg ts mode equal true and midway will be disabled
return process.env.EGG_TS_MODE !== 'true' && !!this.app.options.typescript;
}

get applicationContext(): MidwayContainer {
Expand Down

0 comments on commit 0b6793c

Please sign in to comment.