Friday, 28 April 2017

npm start / reactjs - how to keep the browser from reloading on save

I am working with applications bootstrapped with create-react-app and everything works very well. I have been up and down the docs provided here:

https://www.npmjs.com/package/react-scripts

but can't find an answer to my question. Simply: when using npm start to run an application in development how do I tell npm not to reload the browser with every save? Reloads can be painful when you've got Chrome's React and Redux devtools extensions right where you want them.

I'm sure the answer is in the layout of these scripts from package.json:

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }

but for the life of me I can't find any details on the greasy grimy gopher guts of how these scripts work. Is this a node.js question? Pointers to any top-level documentation are appreciated. I'm not sure where to start...



via Omortis

No comments:

Post a Comment