Does @defer works on non-standalone component?

Discussão em 'Angular' iniciado por Ahalya, Fevereiro 19, 2025.

  1. Ahalya

    Ahalya Guest

    My angular project is a non-standalone component and modules. In order to reduce the initial bundle size, @defer is one if the options.

    I have been wondering if it is possible to use in non-standalone project. If it only works on standalone components, can you provide me the steps?

    Steps I tried to do:

    1. Create a sample standalone project
    2. Imported CommonModule package
    3. Used @defer in template component(html)
    4. Run npm run build
    5. Found no lazy chunk files after build.

    Continue reading...

Compartilhe esta Página