An updated Elm HMR provider

Hi, everyone! Long-time lurker, first-time poster. I’ve been using Elm for quite a while and have found this discussion board an invaluable tool.

I’m writing an Electron app using Elm for its frontend. I’m using Parcel as the bundler. The HMR was “broken” due to its use of eval() and triggered CSP violations.

I’ve created https://www.npmjs.com/package/@curtissimo/elm-hot as a drop-in replacement for the original elm-hot. The new version, just published yesterday, also includes:

  • Support for Worker-scoped HMR
  • Support for “headless” Elm applications (Program.worker)
  • CSP-compliant execution

This gave me the opportunity to finally dig deep into the output of the Elm compiler. Which, wow, it makes so much sense, now.

If you’re of the mind and disposition, please go upvote the related Parcel GitHub PR ( Use @curtissimo/elm-hot with @parcel/transformer-elm by realistschuckle · Pull Request #10256 · parcel-bundler/parcel · GitHub ).

14 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.