Dynamic import loads duplicate module

Discussão em 'Angular' iniciado por Desperado, Junho 30, 2025.

  1. Desperado

    Desperado Guest

    in Angular 17, using ng serve library code

    await import("@spectrum-web-components/overlay/src/Overlay.js")


    returns a module that already exists in the app and the class is the same as one I already have registered in custom elements and can be initialized.

    Using ng build this code returns a different module which throws error when library tries to initialize that class.

    How can I make ng build work correctly?

    Continue reading...

Compartilhe esta Página