Open avrahamcool opened 5 years ago
Maybe something like this?
https://robinraju.github.io/developer/2017-11-14-loading-external-config-in-angular
But better.. Obviously
@avrahamcool latest webpack setup addressed parts of this, it uses app-settings-loader to avoid coping env file.
💬 RFC
I want to talk about handling variable that are
environment
specific in aurelia.the way that we handle it now, is by having multiple
json
files in anenvironment
folder, when we start a build process - one of those files is copied into thesrc
folder, and gets bundled with the rest of the app. you can dictate witch file is copied by specifying the "--env" flag while building.in those files, you can put whatever you want - so it's an easy way to have
variables
that differ between environments.I see 2 different kind of variables that can go into those config files.
the current way of handling config files has another problems/limitations:
src
folder - that should not be committed into the source control.readlony
attributes to all the files that he manages - so copying one of the config files work only once, the next time you try to build - the file cannot be overwritten because of thereadonly
flag. https://github.com/aurelia/cli/issues/1031what can we do about this? how does other framework handle config files? can we have 2 sort of configs? one for build time variables? and another for run time variables? can we even have files that are left outside of the bundle for easy editing? can we skip the part where we copy the file into
src
?