1

I have a web app that uses Angular on the front end. During code review the reviewer noticed that my live app is running Angular in development mode. He said that there are errors in live mode that wouldn't allow it to compile or something. I talked to my dev and he said that production mode doesn't handle dialogs very well so we need to run it in developer mode for it to work. Is there a solution to make dialogs work properly in production mode or should we keep running it in developer mode? Are there any drawbacks to running it in developer mode?

  • application in dev mode is at leats 10 times bigger. Be careful about your ux – Melchia Nov 09 '19 at 00:33
  • 2
    I think you reviewer's comment about "errors in live mode" are bs... Let us try to address your production build issues... What happens when you run `ng build --prod`? Please add the reported issues to the question – The Fabio Nov 09 '19 at 00:37
  • I can only agree with @TheFabio - "doesn't handle dialogs very well" is a really broad answer. If possible, you want your Angular apps to run in production mode and AoT compiled. However, this question was actually answered here: https://stackoverflow.com/questions/34868810/what-is-the-difference-between-production-and-development-mode-in-angular2 If that's OK for you, is up to you. – maio290 Nov 09 '19 at 00:39
  • 1
    another major issue with deploying your app in dev mode is that the generated names of the files in dev mode are constant, "app.js" , "vendor.js" and so own. Because web browsers cache files by name, every time your app is updated users could be stuck in previous versions until their browser cache is cleaned... – The Fabio Nov 09 '19 at 00:46
  • Thanks for the replies all. Asked reviewer for the build errors and will post those here when he replies. – Rusty Craig Nov 09 '19 at 04:18
  • Here is a list of warnings and some recommendations the code reviewer made. I'm just wondering how running in dev mode will affect performance and user experience. https://drive.google.com/file/d/1Sw6EUivqJ8obOSiDK3Tnesf_Y746wY4e/view?usp=sharing – Rusty Craig Nov 09 '19 at 04:34
  • Basically reviewer said that the main issue was with "ngx-bootstrap”. The version of the package used wasn’t compatible to be run on production that's why angular prod build was failing. – Rusty Craig Nov 09 '19 at 04:45

1 Answers1

3

Short Answer: No

A good explanation on the difference beween the prod and dev mode builds is given on the answers to this question: What is the difference between production and development mode in Angular2?

A more in-depth answer can be found on this blog.

Main dot points in regards to deploying angular apps with dev built:

  • Source Map(.map files) would be available to all users
  • no Minification and Uglification
  • Css in js files (in prod mode css is built in css files)
  • no Tree Shaking (considerably bigger files)
  • JIT compiler (considerable slower app)
The Fabio
  • 5,369
  • 1
  • 25
  • 55