Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Remove Hot Module Replacement #81

Closed
fredguest opened this issue Feb 28, 2017 · 4 comments
Closed

Remove Hot Module Replacement #81

fredguest opened this issue Feb 28, 2017 · 4 comments

Comments

@fredguest
Copy link

It's unclear to me from the customization section of the docs how to remove Hot Module Replacement fromneutrino-preset-web or React Hot Loader from neutrino-preset-react. @eliperelman could you provide an example?

@eliperelman
Copy link
Member

eliperelman commented Feb 28, 2017

To shut off HMR, I suppose you could do the following:

config.entry('index').delete('webpack/hot/dev-server');
config.plugins.delete('hot');
config.devServer.hot(false);

It's not documented anywhere, but I suppose that might be something useful to add to the docs.

@fredguest
Copy link
Author

I see, thanks for the help! So there's no way to accomplish this via package.json configs correct?

@eliperelman
Copy link
Member

eliperelman commented Feb 28, 2017

Correct, removing based on a JSON directive would make things much more difficult. The only setting you can change from JSON would be setting the dev server hot to false:

{
  "config": {
    "neutrino": {
      "devServer": {
        "hot": false
      }
    }
  }
}

@fredguest
Copy link
Author

Ok cool, the JavaScript solution should be fine then, thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants