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

Commit

Permalink
Alias for Ionic environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
gshigeto committed Sep 1, 2017
1 parent 1500f11 commit f9dd87d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config/optimization.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
7 changes: 5 additions & 2 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -53,4 +56,4 @@ module.exports = {
net: 'empty',
tls: 'empty'
}
};
};

0 comments on commit f9dd87d

Please sign in to comment.