[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-24 Thread Robin Heggelund Hansen
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

[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-24 Thread Rafał Cieślak
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.

Re: [elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-23 Thread Noah Hall
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

[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-23 Thread Robin Heggelund Hansen
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

[elm-discuss] Re: Structure for multiple small "apps" when using Elm with webpack (elm-webpack-loader)

2016-11-23 Thread Rafał Cieślak
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