-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The entry point "react" cannot be marked as external #16
Comments
@beeequeue Hi! I've got the same problem. Did you manage to solve it? |
The workaround is change your package.json and move react and react-dom in the devDeps |
Moving to devDeps seems to work but now when the remote loads, React throws errors: |
I downgrade these versions:
and it's working good. I will release a new version of |
These versions give me a peer dependency failure. Why the solution to this is downgrading? |
This is also an issue in the React example linked from the README for this project. |
I have the same problem, any solutions for this? |
Hi all! Just remove |
Can we please mention in the README that this plugin is broken and doesn't work with with react? It will save a lot of time to all the developers who try to use it and find out it is, in fact, broken. |
@sedx Thanks for you suggestion I'll look how to reintroduce the plugin and get rid of the error. |
I moved all the dependencies inside |
Are you saying that to make this work you can't really use singleton, but you have to save your React copy in the window object? This sounds everything but Module Federation 🤨 Wouldn't it be easter to say "this plugin is broken if you use it with React" in the README? Surely, especially if the plugin lives in this organisation, users need to know. |
@cristiano-belloni thanks for your feedback. Your suggestion could be a solution. In the newest versions of esbuild the internal implementation is changed, we are struggling with it. I would like to solve the problem because this package can help other developers. You can help as well with PRs if you want. |
@gioboa precisely - mark it as broken with React until it's fixed and link this issue. This way it will be immediately clear to developers. Trying to make it work with hacks like storing the React object in the global namespace makes things worse. |
Yup, that makes sense to me. |
+1 |
We are working on a new version that will definitely solves this. @ScriptedAlchemy did a big step forward, he did the official esbuild adapter and the runtime loaders too. |
+1 on a solution - removing the react plugin isn't an option for us, and downgrading feels incorrect. Looking forward to a new adapter and runtime loaders. |
@gioboa are there any timelines for the new version? |
We are working on a new version of this package in this PR |
I'm trying to set up a minimal setup to test using this for work, but something seems wrong, as the dev server just crashes immediately as you load the site in the browser with the error
The entry point "react" cannot be marked as external
Repro: https://github.com/BeeeQueue/repro-vite-mf-react
pnpm i
mfs/shell: pnpm dev
The text was updated successfully, but these errors were encountered: