michaldarda / parcel-rails

Integration of Parcel Javascript module bundler with Rails
MIT License
68 stars 4 forks source link

Handle HMR (hot-module-reloading) #8

Closed megalithic closed 6 years ago

megalithic commented 6 years ago

Presently with the latest release of parcel-rails, I have to disable HMR via --no-hmr flag in my node scripts for running the parcel server (we're still on rails 4.2, so not using the binstubs). Do you have your setup running with HMR per chance?

If I leave HMR enabled i get an infinite reload on file change; parcel's output shows an Write EPIPE error, and nothing else.

Any thoughts? I'd love to chat with you on the parcel slack if you have time. It could just be as simple as "we only support things fully if you use Rails 5.x", which at least, knowing that, would help to in general, get past this particular error.

Also, would having my entry "html" point as a haml file be bad?

Thanks and please let me know what technical info I might be able to provide to help debug further.

bmakuh commented 6 years ago

@megalithic make sure you have "react-hot-loader/babel" if you're using React. That was my problem 😉