Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit befac7b

Browse files
committed
refactor(webpack): only force transpilation to es5 for prod builds (required for uglify)
only force transpilation to es5 for prod builds (required for uglify)
1 parent 692b0dd commit befac7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webpack/transpile-loader-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function transpileLoader(source: string, map: any, webpackContex: any) {
1515

1616
// we only really care about transpiling stuff that is not ionic-angular, angular, rxjs, or the users app
1717
// so third party deps that may be es2015 or something
18-
if (! isSrcOrIonicOrIonicDeps(absolutePath) && !context.isWatch && getBooleanPropertyValue(Constants.ENV_BUILD_TO_ES5)) {
18+
if (! isSrcOrIonicOrIonicDeps(absolutePath) && context.isProd && getBooleanPropertyValue(Constants.ENV_BUILD_TO_ES5)) {
1919
const transpiledOutput = transpileTsString(context, absolutePath, source);
2020
const sourceMapObject = JSON.parse(transpiledOutput.sourceMapText);
2121
return callback(null, transpiledOutput.outputText, sourceMapObject);

0 commit comments

Comments
 (0)