0

How to avoid junk names given when angular application build in production mode (ng build --prod)

example when i build normally using ng build command my module request is going like this

http://localhost:8762/accsm/cp-create-cp-create-module.js

same when i run in production mode using ng build --prod my request name is giving some junk name as follows

http://localhost:8762/accsm/5.4038f5bfd96424556526.js

How do avoid this junk name issue in production mode also?

Regards, Bikshapathi

Bikshu s
  • 389
  • 4
  • 14
  • This is the best practice for production build (to invalidate cached version), why would you like to do that? – felixmosh Jan 02 '20 at 08:17
  • @felixmosh we are building a framework for loading different angular micro apps using proxy in that case we always wanted to have same name for module In production also – Bikshu s Jan 02 '20 at 09:40
  • But there are solutions for this, you can ask from webpack a map from entry to its unique file name – felixmosh Jan 02 '20 at 13:51

0 Answers0