A way to disable Elm Optimize Level 2 in Elm Pages build

We run into a bit of a dead end that we described here: https://github.com/mdgriffith/elm-optimize-level-2/issues/93. We would love to help resolve it at the root, but it looks like it might take some time. In the meantime we need a workaround to continue working on our project. It seems like using the standard Elm compiler might be the easiest route.

I quickly glanced at the source code of Elm Pages generator and it seems that elm-optimize-level-2 is a hard dependency. Am I right? If so, would it make sense for it it to be optional? Would you @dillonkearns be open for a PR in this direction? Is there anything I should consider first?

Probably I’ll try to fork it later today and see how far I can go with it. We need to get un-stuck quickly.

cc: @mdgriffith

ps: I’m really grateful for both projects and all the work you and others put into them. Thanks!

Yeah, I think it would make sense to have an option to disable elm-optimize-level-2. Or another way to put it, to run elm-pages build in different modes:

  1. Debug (--debug)
  2. Without --optimize and without EOL2 (elm-optimize-level-2)
  3. With --optimize but without EOL2
  4. With --optimize and EOL2

I would love to discuss more, I think a good starting point for the discussion would be to propose what the elm-pages build command would look like for each of those 4 modes.

For example:

Number Description Command
1 Debug (--debug) elm-pages build --debug
2 Without --optimize and without EOL2 (elm-optimize-level-2) elm-pages build ???
3 With --optimize but without EOL2 elm-pages build ???
4 With --optimize and EOL2 elm-pages build ???

I think a GitHub issue on the elm-pages repo would be a better place to discuss those details. Would you mind opening an issue there to continue the conversation?

1 Like

Good idea. Here: A way to disable Elm Optimize Level 2 · Issue #288 · dillonkearns/elm-pages · GitHub

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.