react2angular
react2angular copied to clipboard
Webpack Module Federation Support
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: https://github.com/webpack/webpack/discussions/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 ?