Skip to content

Angular Native Federation and Secondary Entry Points #502

Description

@AlanGRutter

I am hoping that you can help me with an issue.

I have an Angular application that uses Angular Architects Native Federation (which uses es-module-shims).

When using a local library with no secondary entry points, everything works fine, but I have now split my library so that it has secondary entry points in order to make more of the code tree-shakable and improve loading times.

My host app uses one of the secondary entry points 'authentication/guards' in its app.routes.ts file but when the application loads I am seeing an error in the dev console

main.ts:7 Error: Unable to resolve specifier 'authentication/guards' imported from https://localhost:43881/chunk-6YZ5XX3T.js
    at throwUnresolved (es-module-shims.js:679:11)
    at _resolve (es-module-shims.js:596:59)
    at resolve (es-module-shims.js:615:30)
    at es-module-shims.js:1246:28
    at Array.map (<anonymous>)
    at es-module-shims.js:1225:10
    at async loadAll (es-module-shims.js:707:5)
    at async topLevelLoad (es-module-shims.js:838:5)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions