I am moving backend to Haskell and thinking about Elm as a frontend counterpart.
A typical single page app need multibundle feature (let’s say 50kb core and 10kb per route loading on demand) to be responsive.
Plus I would like to see internationalization support. In my opinion it is not implemented well even in React. All libraries I saw generate 1 gigantic file merging text from all pages.
So I would like to know the status regarding this 2 subjects in Elm.
I pretty happy about my preact prototype where I achieved all this goals, but it lacks coherent crossend types due langues.
So far frontend dev in Elm has been my favorite dev experience (better than Meteor, Vue or Svelte that I used back in time).
If I’m right folks at NoRedInk (where Evan, the creator of Elm works) have an Haskell backend for their Elm frontend and it’s working great. Also I’ve heard in a Elm-town podcast that they typically use an Elm app per page. Is that what you mean by multibundle? Maybe @rtfeldman could tell you more about the NoRedInk stack…
For internationalization a best practice is to have localized builds that you access via different paths. An npm packagedoes used to do this but I couldn’t make it work with Elm 0.19. So I just made my own little npm scripts to create a symbolic link to have the desired file structure and then I have no dependencies.
There is no code splitting that I’m aware of, but elm apps are way smaller then all non compiled counterparts. I guess you could split it manually how @Laurent
elm-pages has data-splitting built-in with the StaticHttp API. The data you get there is typed, and your build will fail if there’s an issue.
elm-pages doesn’t currently support dynamic routes, only static routes. So I’m not sure if it would be a fit for your current problem in its current state. That’s on the roadmap.