Replace chunk name with module name in angular 4 lazy loading

 ng build --namedChunks=true --outputHashing=none --vendorChunk=true
  • namedChunks Use file name for lazy loaded chunks
  • output-hashing Define the output filename cache-busting hashing mode.
  • vendorChunk Use a separate bundle containing only vendor libraries.

you should be using -nc flag

ng build --aot -nc


ng build --aot --named-chunks

Update 1 : Based on Comment

to remove the hash numbers set the --output-hashing to false as below

ng build --aot --nc --output-hashing=false

Documentation Link