I set up my web app using the Universal Starter - here and am trying to use environment.production to switch between a production config and a development config inside ./src/config/server.config.ts but the value is always false. When I check the value inside a lazy loaded route the value is correct. What am I to do to get it to be the correct value server side?
any help is appreciated. thank you
I think you want something with how you're configuring webpack and creating your environment in your npm scripts. You can set the environment based on your webpack configuration. Using webpack-merge you can have multiple configuration packages and by setting each one up to the values you have defined you can swap back in forth with webpack-merge in your npm scripts. Refer to the link below.
https://webpack.js.org/guides/production/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With