Workaround Main Builds#305
Open
markovejnovic wants to merge 1 commit into
Open
Conversation
Drops --debug (current elm-pages emits a non-runnable bundle in debug mode) and switches to --optimize 1 to avoid the elm-optimize-level-2 F-wrapper-arity bug tracked in mdgriffith/elm-optimize-level-2#120 (which elm-pages bundle-script uses by default at --optimize 2). The 'prepare' hook lets consumers depend on this fork via a git URL — npm runs the script after cloning so dist/elm-open-api.js materialises without a manual build step. elm-pages is pinned to the bun.lock version (3.3.3) since the npm/elm package pair must agree.
Collaborator
|
Yes, please separate out the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a workaround around an upstream issue mdgriffith/elm-optimize-level-2#120 by disabling
--optimize 2, and falling back to--optimize 1.Additionally, I add a
npm preparescript which relies onnpm(for cross-compatibility) and makes it easier for people to install this package viagit(and my project has it as such:Note: This adds a
package-lock.json.If you find the
package-lock.jsonundesirable, I can revert the addition of thenpm preparescript.Heads up: PR made with the help of LLMs