dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

build: Webpack hot module reload & devserver setup

Open peterzen opened this issue 1 year ago • 2 comments

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.

peterzen avatar Mar 12 '24 19:03 peterzen

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?

buck54321 avatar Mar 14 '24 19:03 buck54321

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?

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.

peterzen avatar Mar 15 '24 22:03 peterzen

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.

buck54321 avatar Jul 15 '24 17:07 buck54321