Skip to content

Commit

Permalink
feat: add env switch to disable ts (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
denghongcai committed Apr 29, 2020
1 parent 669959c commit 73aeba9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/midway-web/src/utils.ts
Expand Up @@ -43,6 +43,9 @@ export function getMethodNames(obj: object): string[] {
}

export function isTypeScriptEnvironment(): boolean {
if (process.env.MIDWAY_TS_MODE === 'false') {
return false;
}
return !!require.extensions['.ts'] || process.env.MIDWAY_TS_MODE === 'true';
}

Expand Down

0 comments on commit 73aeba9

Please sign in to comment.