You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comipling the following file with npx elm-esm make src/DocumentWithFlags.elm --output=elm-esm-output.js, you can open the compiled js output and will notice that at the end the call to _Platform_export is not fully replaced.
moduleDocumentWithFlagsexposing (main)
importBrowserimportHtmlexposing (..)
importJson.Decodetype alias Flags=-- Json.Decode.Value -- this would work{ test :String}main:ProgramFlagsModelMsgmain =Browser.document
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}type alias Model={ property :String}init:Flags-> ( Model, CmdMsg )
init _ =(Model"",Cmd.none )type Msg=Msg1|Msg2update:Msg->Model-> ( Model, CmdMsg )
update _ model =( model,Cmd.none )subscriptions:Model->SubMsgsubscriptions _ =Sub.none
view:Model->Browser.DocumentMsgview _ ={ title ="Document Title", body =[ h1 [][ text "loaded"]]}
Hello,
the following bug was created on my https://github.com/marc136/snowpack-plugin-elm/issues/3 by @andreasewering
And as I copied the code to turn the compiled elm code into an es module from your repository, I think the change should also be propagated into your tool.
I fixed it in my repo with this change.
Regards,
marc
Full description
When comipling the following file with
npx elm-esm make src/DocumentWithFlags.elm --output=elm-esm-output.js
, you can open the compiled js output and will notice that at the end the call to_Platform_export
is not fully replaced.The output ends with the following lines:
But it should be:
The text was updated successfully, but these errors were encountered: