In Elm 0.18 and previous versions, the core of Elm is included with every bundle.

This can be inefficient, for example if you're loading different Elm components on multiple pages. Each page would need its own bundle generated but the Elm core would be included with each bundle.

Workaround (untested!)

Compile your Elm code into a bundle, output.js Open output.js and starting from the beginning of the file up until the last var declaration that looks something like this: var _elm_lang$html$Html_Events$Options = F2( Below that last variable declaration that starts with _elm_lang you should see the code for the module that you wrote. That's where the separation begins. Copy and paste that whole chunk into a separate file and name it elm-core.js Tada! You should now be able to load them like this in your HTML files: <html> <script src="elm-core.js"></script> <script src="output.js"></script> </html>

Beware! The whole output bundle is wrapped in an IIFE (immediately invoked function expression) so you will have to wrap all of the chunks in that to make sure it works. If you don't then you will get errors like "F2 is not defined" and "A2 is undefined".

Elm 0.19+

In future versions of Elm there should be a nicer solution to this problem.