1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Generate a production build for angular without including any dependencies in the bundle

Discussão em 'Angular' iniciado por Prasanth, Junho 24, 2025.

  1. Prasanth

    Prasanth Guest

    I am creating a new angular application and want to be able to load all project dependencies such as angular libraries, rxjs, moment-js, etc externally from a common location (CDN) in the production build.

    Is there a way to configure angular project in so that the dependencies / dev-dependencies mentioned in package.json are not bundled within the production build generated using "ng build --configuration production", there-by resulting in a smaller bundle size?

    I generated angular build by changing the dependencies to dev-dependencies, but that had not been fruitful. I did not find any related options in the angular command-line documentation. Multiple searches on the Internet including Stack Overflow for the same did not land me on related topics.

    Continue reading...

Compartilhe esta Página