nx
nx copied to clipboard
Enable `"hot": "only"` scenario
- [ ] I'd be willing to implement this feature (contributing guide)
Description
webpack-dev-server has this schema for hot
:
{
"anyOf": [
{
"type": "boolean",
"cli": {
"negatedDescription": "Disables Hot Module Replacement."
}
},
{
"enum": ["only"]
}
],
"description": "Enables Hot Module Replacement.",
"link": "https://webpack.js.org/configuration/dev-server/#devserverhot"
}
But hmr
in web/dev-server only allows a boolean, and setting liveReload: false
does not prevent the page from full reloading if hot reload is not possible.
Motivation
Sometimes we want to only allow hot reload but prevent reload as a fallback.
Suggested Implementation
When hmr
is set to true
and liveReload
is set to false
, translate it to hot: "only"
in webpack config.
Alternate Implementations
Enable hmr: "only"
in schema.
@ziacik same issue here
- nx version:
14.3.6
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
Not stale (I guess)
This seems to already be the case @ziacik
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.