The source code is here. The main file is main.ts. I have been using a single Elm app named Main, and now I’m adding another one named Css which controls a <style> element in <head>. When I run webpack, I see this error message:
var M = require('./Main.elm');
var C = require('./Css.elm');
let app = M.Elm.Main.init({
node: document.getElementById('ui'),
});
let cssApp = C.Elm.Css.init({
node: document.getElementById('style'),
});
But when I run this, it successfully compiles:
$ elm make src/Css.elm --output=/dev/null
Maybe I should build both apps into a single file and import that, but I’m not sure how to do that with Webpack.
let Elm = require('./Main.elm');
let app = Elm.Main.init({
node: document.getElementById('ui'),
});
let cssApp = Elm.Css.init({
node: document.getElementById('style'),
});