Skip to content

StaticInjectorError when loading via systemJS import-map #241

@SebastianOltmanns

Description

@SebastianOltmanns

I want to share common dependencies in a micro-frontend project using single-spa/single-spa-angular. When trying to share @esm-bundle/angular__core, the console shows the following error:

grafik

MWE: https://github.com/SebastianOltmanns/singlespa-angular-core-share-dep

My minimal working example has three projects:

  • root, the root-config, where the systemJS import-map is loaded and the micro-frontend services are loaded
  • p1, basic angular example project, where @angular/core is externalized
  • p2, basic angular example project, where @angular/core is included

When running all three projects, visiting p1 gives the error shown above, but visiting p2 works. The literal only difference in p1 and p2 is in externalizing the @angular/core library, and instead using @esm-bundle/angular__core. This is why I open this issue here, because I think it has to do with this project.

Thanks for any help or investigations!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions