How to enable production mode?

后端 未结 14 1232
忘掉有多难
忘掉有多难 2020-11-29 16:44

I was reading related questions and I found this one, but my question is how can I switch from development to production mode. There are some differences between the modes w

14条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 17:38

    When ng build command is used it overwrite environment.ts file

    By default when ng build command is used it set dev environment

    In order to use production environment, use following command ng build --env=prod

    This will enable production mode and automatically update environment.ts file

提交回复
热议问题