Skip to content
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

Webpack Module Federation Support #140

Open
hezi-bigpanda opened this issue Jan 24, 2022 · 0 comments
Open

Webpack Module Federation Support #140

hezi-bigpanda opened this issue Jan 24, 2022 · 0 comments

Comments

@hezi-bigpanda
Copy link

Hi, I am using today react2angular in my angularjs application in order to adapt react components

I want to extract these components to another application, however, it causes an error when I declare react as a shared service in webpack module federation plugin https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption.

For more information see this discussion in webpack github: webpack/webpack#15237:

Uncaught Error: Shared module is not available for eager consumption: webpack/sharing/consume/default/react/react
at Object.webpack_require.m. (consumes:144)
at webpack_require (bootstrap:24)
at fn (hot module replacement:61)
at Object../node_modules/react2angular/index.js (index.js:23)
at webpack_require (bootstrap:24)
at fn (hot module replacement:61)
at ......

Is there a way to work it around, in general, the solution should be dynamically import the render code like in the docs, but I have no control on the rendering

Any advise ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant