nx icon indicating copy to clipboard operation
nx copied to clipboard

Enable `"hot": "only"` scenario

Open ziacik opened this issue 2 years ago • 1 comments

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 avatar May 23 '22 10:05 ziacik

@ziacik same issue here

  • nx version: 14.3.6

gamegee avatar Aug 09 '22 13:08 gamegee

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! 🙏

github-actions[bot] avatar Apr 17 '23 00:04 github-actions[bot]

Not stale (I guess)

ziacik avatar Apr 17 '23 09:04 ziacik

This seems to already be the case @ziacik

k3v3n avatar Apr 18 '23 22:04 k3v3n

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! 🙏

github-actions[bot] avatar Dec 25 '23 00:12 github-actions[bot]

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.

github-actions[bot] avatar Feb 08 '24 00:02 github-actions[bot]