diff --git a/config/optimization.config.js b/config/optimization.config.js index f28d1f47..5e2e3b68 100644 --- a/config/optimization.config.js +++ b/config/optimization.config.js @@ -11,7 +11,10 @@ module.exports = { }, resolve: { - extensions: ['.js', '.ts'] + extensions: ['.js', '.ts'], + alias: { + '@app/env': path.resolve('src/environments/environment' + (process.env.IONIC_ENV === 'prod' ? '' : '.' + process.env.IONIC_ENV) + '.ts') + } }, module: { diff --git a/config/webpack.config.js b/config/webpack.config.js index 60d8a959..e1bd4768 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -21,7 +21,10 @@ module.exports = { resolve: { extensions: ['.ts', '.js', '.json'], - modules: [path.resolve('node_modules')] + modules: [path.resolve('node_modules')], + alias: { + '@app/env': path.resolve('src/environments/environment' + (process.env.IONIC_ENV === 'prod' ? '' : '.' + process.env.IONIC_ENV) + '.ts') + } }, module: { @@ -53,4 +56,4 @@ module.exports = { net: 'empty', tls: 'empty' } -}; \ No newline at end of file +};