ng build of angular-cli creates 3 files:
inline.bundle.js
vendor.bundle.js
main.bundle.js
and also a map file for each own. What for?
I
@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
Below command will not generate the source files while generating the build:
>ng build --prod -sm false
and if you want to generate the source files the use below command:
>ng build --prod -sm true
Here is the screenshot:
.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!!