web-infra-dev / rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.
https://rsbuild.dev/
MIT License
1.58k stars 124 forks source link

[Bug]: Rsbuild dev hangs with MF2 when DTS is enabled #3648

Open Jonty800 opened 1 week ago

Jonty800 commented 1 week ago

Version

System: OS: macOS 14.6 CPU: (8) arm64 Apple M2 Memory: 220.02 MB / 16.00 GB Shell: 5.9 - /bin/zsh Browsers: Chrome: 129.0.6668.90 Edge: 129.0.2792.79 Safari: 17.6 npmPackages: @rsbuild/core: ^1.0.9 => 1.0.9 @rsbuild/plugin-less: ^1.0.1 => 1.0.1 @rsbuild/plugin-react: ^1.0.3 => 1.0.3 @rsbuild/plugin-sass: ^1.0.2 => 1.0.2

Details

If I run rsbuild build and then rsbuild preview, it works as expected, however, rsbuild dev hangs and I can never load the webapp into localhost:3000.

When dts on MF2 is disabled, it works.

Is there a way to see more verbose logs?

$ /Users/JBaker/commercial/frontend/nexus-mfe/node_modules/.bin/rsbuild dev --open
  Rsbuild v1.0.9

  ➜ Local:    http://localhost:3000/
  ➜ Network:  http://192.168.0.232:3000/
  ➜ Network:  http://100.64.0.1:3000/

start   Compiling...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Federated types created correctly

Reproduce link

http://localhost:3000

Reproduce Steps

yarn rsbuild dev

chenjiahan commented 6 days ago

This should be related to the @module-federation/enhanced plugin, can you provide a reproduction or report this issue to the https://github.com/module-federation/core repo?