I am pretty new to the javascript world. I have an application with Angular2 + Webpack using Typescript and I want to define the url of my server inside a property file in order to be able to change it after the build.

It's like a config.js file accessible after the build and accessible in dev mode too.

First: is it a good idea?
Second: why am I feeling like I am the only one with this kind of problem?

If it is a good idea, how do you do this?