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

Commit e364134

Browse files
committed
refactor(config): don't transpile bundle to es5 by default now that ionic and angular use esm by default
1 parent ba5e0cd commit e364134

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/util/config.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,12 @@ describe('config', () => {
148148
expect(fakeConfig[Constants.ENV_TOAST_COMPONENT_FACTORY_PATH]).toEqual(join(context.ionicAngularDir, 'components', 'toast', 'toast-component.ngfactory.js'));
149149

150150
expect(fakeConfig[Constants.ENV_PARSE_DEEPLINKS]).toBeTruthy();
151-
expect(fakeConfig[Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING]).toBeFalsy();
152151
expect(fakeConfig[Constants.ENV_PURGE_DECORATORS]).toBeTruthy();
152+
153+
expect(fakeConfig[Constants.ENV_EXPERIMENTAL_MANUAL_TREESHAKING]).toBeFalsy();
153154
expect(fakeConfig[Constants.ENV_USE_EXPERIMENTAL_CLOSURE]).toBeFalsy();
154155
expect(fakeConfig[Constants.ENV_USE_EXPERIMENTAL_BABILI]).toBeFalsy();
155-
expect(fakeConfig[Constants.ENV_BUILD_TO_ES5]).toEqual('true');
156+
expect(fakeConfig[Constants.ENV_BUILD_TO_ES5]).toBeFalsy();
156157
expect(context.bundler).toEqual('webpack');
157158
});
158159

src/util/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export function generateContext(context?: BuildContext): BuildContext {
295295

296296
// default stand-alone builds to default to es5
297297
// if closure is being used, don't worry about this as it already automatically converts to ES5
298-
const buildToEs5 = getConfigValue(context, '--buildToEs5', null, Constants.ENV_BUILD_TO_ES5, Constants.ENV_BUILD_TO_ES5.toLowerCase(), useExperimentalClosure ? null : 'true');
298+
const buildToEs5 = getConfigValue(context, '--buildToEs5', null, Constants.ENV_BUILD_TO_ES5, Constants.ENV_BUILD_TO_ES5.toLowerCase(), null);
299299
setProcessEnvVar(Constants.ENV_BUILD_TO_ES5, buildToEs5);
300300
Logger.debug(`buildToEs5 set to ${buildToEs5}`);
301301

0 commit comments

Comments
 (0)