What are the .map files used for in angular-cli and can ng build not create these files?

.map files are used for debugging your application. It is not related with angular-cli and is feature of typescript compiler, you may set\unset in tsconfig file like below,

 "sourceMap": true\false

Hope this helps!!


@Madhu's answers disables it for any ng build command. If you want to conditionally or temporarily disable it from your builds run:

Angular 8

ng build --watch --source-map=true/false

Angular 7

ng build --watch --sourcemaps=true/false

Angular 6

ng build --watch --no-sourcemap