Conversation
pi install/update of git packages runs `npm install --omit=dev`, which skips esbuild (a devDependency) but still runs the prepare script. prepare imported esbuild unconditionally, so installs failed even though runtime.bundle.ts is already committed. Skip the rebuild when esbuild is missing and the committed bundle exists.
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.
Problem
pi install/pi updateof this git package runsnpm install --omit=dev. That skipsesbuild(adevDependency) but still runsprepare→build:runtime, which importedesbuildunconditionally:The page-side bundle is already committed (
runtime.bundle.ts), and the README says end users should not need a build step.Fix
If
esbuildis not installed andruntime.bundle.tsalready exists, skip the rebuild. Developers with a full install still regenerate the bundle as before. A missing bundle without esbuild still fails loudly.This is an alternative to #6 (moving esbuild into
dependencies). Shipping esbuild to every consumer is unnecessary when the committed bundle is the artifact they actually use.Tested