Define "big blob of js"
React, the framework alone, is around 54kb gzipped, my elm SPA is currently
half that gzipped. Also, you would load the same blob once, as it's cached
in your browser.
Currently, if you split your app up into multiple entry points, those would
still require the Elm
Robin:
I would just keep everything in one Elm app, then use a router to display
> the correct page.
The problem I see with this is that our app is not SPA, so each page that
needs an Elm app would need to load a big blob of JS with dependencies of
all the Elm modules in our source code.
At NoRedInk, we use a single elm code base with multiple entry points
for each different page with a unique elm app. This is ideal in terms
of build time and reliabitly, as everything can be built and once and
share a single lot of packages.
We also use the webpack loader for this style of app
I would just keep everything in one Elm app, then use a router to display
the correct page.
When it comes to google closure, Elm only works with SimpleOptimizations.
There are two-three lines in the runtime which causes problems with
AdvancedOptimizations.
In any case, the difference between
For the posterity, I implemented said "architecture" in one of my side
projects. https://github.com/ravicious/rails-elm-forms/commit/b5ac6964f
The only difference from what I said above is that the Elm apps don't have
their own entry points in the webpack config. Instead, the entry points are