nrwl / nx-labs

A collection of Nx plugins
MIT License
130 stars 48 forks source link

[Bug] HotModuleReplacementPlugin in development is missing #380

Open phal0r opened 4 months ago

phal0r commented 4 months ago

After setting up a new nx project with rxpack configurator, the dev experience was broken, because the dev server would just throw an error, that hot module loading is disabled and the ui won't even load.

After some digging it turned out, that the HotModuleReplacementPlugin was not added.

To fix this I added it manually in rspack.config.js like so:

if(config.mode === 'development') {
    config.plugins.push(new rspack.HotModuleReplacementPlugin())
  }

Since nx should provide a out of the box working dev experience, this should be added to the configurator.