I have an app that i want deployed on 3 different instances. Each has their own api url, logo, name, etcetera.
I will create a config file for each one that will determine the different information, whatever that may be.
Because i will build the app (vue/react/whatever), i can't use dotenv. I'd like to pass a parameter to the npm run build script that will be accessible within the javascript app so the app can select its config it was built for.
Any ideas, or alternatives to what i need to do? Just point me in the right direction.
Thank you very much in advance,
Use for instance
env INSTANCE=1 npm run build
Then you can get the instance number/name in your js configs with process.env.INSTANCE.
At build time your bundler will substitute that with the actual value you've defined.