Skip to content

Instantly share code, notes, and snippets.

@hiepxanh
Forked from GabrielUlici/webpack.config.js
Created May 16, 2018 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiepxanh/c9f2c66b35cdca006ece955331cd230a to your computer and use it in GitHub Desktop.
Save hiepxanh/c9f2c66b35cdca006ece955331cd230a to your computer and use it in GitHub Desktop.
ionic-angular@3.7.0 env fix
var path = require('path');
var useDefaultConfig = require('@ionic/app-scripts/config/webpack.config.js');
var procEnv = process.env.IONIC_ENV;
module.exports = function () {
useDefaultConfig[procEnv].resolve.alias = {
"@app/env": path.resolve('./src/environments/environment' + (process.env.IONIC_ENV === 'prod' ? '' : '.' + process.env.IONIC_ENV) + '.ts')
};
return useDefaultConfig;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment