I have an Angular app with the following simple config file config.js:
export default function(app) {
app.constant('config', {apiUrl: 'https://localhost:8080'});
};
which is imported by Webpack entry point app.js:
import config from './config';
config(app);
I'd like to have a different apiUrl when I do production build.
What's the easiest way to do it in Webpack?
switchonlocation.hostname