Base solution for your next web application
Open Closed

How to use appconfig.production.json? #5662


User avatar
0
larsfk created

Hi!

In my Azure DevOps Im trying to use appconfig.production.json instead of appconfig.json for my Client-side. I have tried many different commands for it, but nothing works. I also tried to trigger it locally but it does only use appconfig.json.

In environment.ts it says to use "npm run ng build --env=prod", but thats not working.

Any tips and tricks? :)

Thanks!


3 Answer(s)
  • User Avatar
    2
    maliming created
    Support Team

    Try it locally: npm run publish to see the environment.

  • User Avatar
    0
    larsfk created

    Looks like that worked locally, any idea what to run in DevOps. Got an error when trying to archive folder dist

  • User Avatar
    0
    larsfk created

    I solved it by running

    npm run publish
    

    in my Azure DevOps pipeline. But because this makes the name of the js-files longer I had to install Chocolatery and install 7-zip and use that to make a "drop". This because of limitations in Azure DevOps Achieve Files.

    Thanks to maliming for helping me :)