Macil / browserify-hmr

Hot Module Replacement plugin for Browserify
MIT License
373 stars 26 forks source link

0.3.7 -> 0.40 broke #46

Closed jeremy-coleman closed 3 years ago

jeremy-coleman commented 5 years ago

0.3.7 works fine, 0.4.0 breaks. image

"start": "budo src/main.tsx -- -p [ tsify ] -p browserify-hmr -t lessify", using this repo https://github.com/bnolan/ts-preact-boilerplate + browserify-hmr

Macil commented 4 years ago

Are you accessing the webpage through the filesystem, or through a local webserver? What's the origin in your URL bar?

You can pass the --disableHostCheck flag to browserify-hmr (-p [ browserify-hmr --disableHostCheck ] to get the old behavior which should work again. Note that the old behavior is vulnerable to an attack: if you visit a webpage that makes a websocket connection to http://localhost, then it can connect to browserify-hmr and read whatever file you're using browserify-hmr with.

jeremy-coleman commented 4 years ago

Local web server, the start command in the post above is all im doing (using budo via cli)

Looks like this https://github.com/mattdesl/budo/blob/master/screenshots/terminal.png

jeremy-coleman commented 3 years ago

disableHostCheck fixed