aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
15.89k stars 558 forks source link

@million/lint with Module Federation suport #981

Closed oytuncoban closed 2 months ago

oytuncoban commented 4 months ago

What version of @million/lint are you using?

0.0.60

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

First of all, my apologies that I opened the issue on million repo. I could not find any suitable repo for @million/lint package.

On projects that use Webpack/ModuleFederation for Micro frontend architecture, React and React DOM are shared dependencies. Whether I set React as eager:true or not, the application throws:

consumes:161 Uncaught Error: Shared module is not available for eager consumption: webpack/sharing/consume/default/react/react
    at __webpack_require__.m.<computed> (consumes:161:1)
    at __webpack_require__ (bootstrap:22:1)
    at fn (hot module replacement:61:1)
    at ./src/index.js (index.js:161:1)
    at __webpack_require__ (bootstrap:22:1)
    at startup:6:1
    at startup:6:1

It seems like, the package has no support for ModuleFederation at the moment. Is there any development about providing support to it? If so, I'd like to collaborate.

What's the expected result?

Dev server to start without any issues like it does without @million/lint.

Link to Minimal Reproducible Example

https://github.com/oytuncoban/million-lint-minimal-repro

Participation

github-actions[bot] commented 4 months ago

Thanks for opening this issue! A maintainer will review it soon.

NisargIO commented 4 months ago

Thank you, @oytuncoban, for reporting this! We will take a look. To report future issues or ask questions, you can use our Discord-> https://million.dev/chat and add to the questions channel.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.