MadaraUchiha-314 / rollup-plugin-module-federation

A rollup plugin for module federation
https://rollup-plugin-module-federation.netlify.app/packages/examples/project-a/dist/rollup/esm/
MIT License
17 stars 1 forks source link

`Uncaught SyntaxError: Cannot use import statement outside a module` error logs in demo #66

Open hi-ogawa opened 1 month ago

hi-ogawa commented 1 month ago

Hi, thanks a lot for the plugin and examples! I just started to study module federation and your repository help me understand it better as my background is mainly Rollup and Vite.

This is a quick question about the error logs in demo. This was probably intended to be solved by your PR on upstream https://github.com/module-federation/core/pull/2753, but it appears that it stills has an issue on latest runtime v0.5.1, which I'm testing locally.

After some digging, it looks like there are two issues:

I think these are still core issues, but I'm far from being able to provide reproduction for core, so I'm writing a report here first.

MadaraUchiha-314 commented 1 month ago

@hi-ogawa Thanks for reporting this issue. I think you are right and the issue is still in https://github.com/module-federation/core. I'll try to send a PR to fix it.