Repository navigation
Only add package.json to the bundle when in Dev - #827
Closed
wouterlucas wants to merge 1 commit into
Closed
wouterlucas wants to merge 1 commit into
wouterlucas wants to merge 1 commit into
Conversation
Test Results: ✅ PASSEDRun at: 2026-10-28T20:54:36.754Z Summary: |
Remove static package.json import so prod bundles skip the full package.json. Resolve Blits/renderer versions via dynamic JSON imports only when __DEV__ is true, avoiding the extra renderer package fetch and Log.info calls on the launch path in production.
Benchmark comparison
Negative means faster. Informational results; small changes can be measurement noise. Head: |
Collaborator
|
Thanks for this PR and flagging the fact that package.json is included in the bundle just to be able to log the versions of Blits and renderer I've taken a slightly different approach here, using a vite plugin: #829 Closing this PR in favour of #829 |
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.
Removes the static
package.jsonimport fromsrc/launch.jsso prod bundles no longer inline the full package.json.Blits/renderer versions are now resolved via dynamic JSON imports inside
logVersionsDev(), called only when__DEV__is true. Prod skips the extra renderer package fetch and theLog.infocalls on the launch path.Notes:
node --check src/launch.jsexits 0, but fulllint/test runners OOM in this environment (pre-existing, also on unmodified files) — needs CI.=== trueguards, arrow helper, no codegen/symbols changes.distcontains nopackage.jsonsnippet (Rollup DCE of the dev-only branch).