From d3346b34620292aef6cc3ef0a36890e4aab8adcf Mon Sep 17 00:00:00 2001 From: Dan Bucholtz Date: Tue, 18 Apr 2017 11:08:31 -0500 Subject: [PATCH] fix(webpack): make ionic-angular/util dir dynamic and use the environment variable of ionic angular make ionic-angular/util dir dynamic and use the environment variable of ionic angular dir --- src/webpack/ionic-environment-plugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webpack/ionic-environment-plugin.ts b/src/webpack/ionic-environment-plugin.ts index 8fbd84ea..1881122e 100644 --- a/src/webpack/ionic-environment-plugin.ts +++ b/src/webpack/ionic-environment-plugin.ts @@ -1,5 +1,6 @@ import { join } from 'path'; -import { getParsedDeepLinkConfig } from '../util/helpers'; +import * as Constants from '../util/constants'; +import { getParsedDeepLinkConfig, getStringPropertyValue } from '../util/helpers'; import { BuildContext , DeepLinkConfigEntry} from '../util/interfaces'; import { Logger } from '../logger/logger'; import { getInstance } from '../util/hybrid-file-system-factory'; @@ -21,7 +22,8 @@ export class IonicEnvironmentPlugin { return callback(); } - const ngModuleLoaderDirectory = join('ionic-angular', 'util'); + const ionicAngularDir = getStringPropertyValue(Constants.ENV_VAR_IONIC_ANGULAR_DIR); + const ngModuleLoaderDirectory = join(ionicAngularDir, 'util'); if (!result.resource.endsWith(ngModuleLoaderDirectory)) { return callback(null, result); }