Closed pauldijou closed 7 years ago
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
Importing Json.Decode (even though I wasn't using it) fixed it for me
import Json.Decode exposing (..)
The new code gen will grab things by crawling from main
so this stuff will get included. The mechanism is different at least.
I hope I'm not missing something but I created a really small Elm program with flags. It looks like the resulting JS code is using
_elm_lang$core$Json_Decode
to decode all flags. But my code does not importJson.Decode
, so it's not included in the compiled JS file, resulting in a runtime exception:ReferenceError: _elm_lang$core$Json_Decode$andThen is not defined
I'm pretty sure I didn't have the problem in Elm 0.17
Elm code
Compiled JavaScript