Suggested tools for developing an elm SPA with a separate HTML file in 0.19

Hi,

I’m working through upgrading an Elm 0.18 SPA to Elm 0.19. When developing the app with 0.18 I was using elm reactor to serve the index.html, and a little hack in index.html to load the app:

<script src="/_compile/Main.elm"></script>
...
<script>
const app = runElmProgram()
</script>

Unfortunately, this hack no longer works in 0.19 (the _compile route is no longer found). Whilst I’m not surprised this undocumented API stopped working, I’m curious: how are others developing SPAs with separate HTML files for Elm 0.19? In particular, I’d like to be able to reload the page in the browser without having to run any additional CLI commands. I’d also prefer to avoid going all in with WebPack etc. if there is a lighter, elm reactor only option I’m missing.

Any suggestions?

What about elm-live? It’s been updated for Elm 0.19.

4 Likes

Ah, thanks for the suggestion! That works perfectly, and reduces the difference between the dev HTML and production HTML.

(In hindsight I probably should have Googled!)

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