dcrdex
dcrdex copied to clipboard
build: Webpack hot module reload & devserver setup
This PR adds webpack hot module reload (HMR) config to hot reload CSS.
To use, run
npm run dev
This starts webpack DevServer on port 9000. Changes to CSS file are hot reloaded.
I'm confused. This causes my browser to auto-reload every time I make a change to js or css? Is that desirable? What else does this offer over the npm run watch script?
I'm confused. This causes my browser to auto-reload every time I make a change to js or css? Is that desirable? What else does this offer over the
npm run watchscript?
This is for hot reloading CSS, when you update the SCSS it applies the changes without reloading the page. It's a byproduct of the consolidation work, quite useful when working on dialogs etc.
I'm just not convinced that this offers a compelling advantage over the watch script. I guess I don't have to click the refresh button, but it's not worth the scope of these changes, imo.