Skip to content

Angular 19 - Cannot use import statement outside a module (at main.js:2:1) #1023

@RobertHajbok

Description

@RobertHajbok

For which library do you need help?

native-federation

Question

Hey guys,

I'm having an issue with Native Federation after upgrading to Angular 19 - Cannot use import statement outside a module (at main.js:2:1). This was previously working with Angular 18 version, the issue seems to be in main.ts file, at this line - import { initFederation } from '@softarc/native-federation-runtime';. The main.js file is not loaded as a module from what I can see, but not sure what is different with this newer version:

Image

Can someone assist with this please? Let me know if you need other details or config files. Also, nice work with this package!

Thanks

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