angularbundling-and-minification

How to disable bundle minification while building angular app?


I have developed a angular project and have implemented SSR(Server Side Rendering) using angular-universal package. I am able to successfully serve my project with SSR at port localhost:4000, But I want to debug it as we do in in source of chrome developer tool. In SSR the main.js is served but I want all components code without minification.

Is there any way to stop of disable minification??

I have tried with --optimization=false, but no luck. I should be able to debug whichever component.ts i wish.


Solution

  • Generally we use the property source-map to true to debug.

    --source-map - Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration | default: boolean false

    build docs