Run web builds before extension builds during deploy#7315
Closed
MitchLillie wants to merge 1 commit intomainfrom
Closed
Run web builds before extension builds during deploy#7315MitchLillie wants to merge 1 commit intomainfrom
MitchLillie wants to merge 1 commit intomainfrom
Conversation
Web builds (e.g. Vite) must complete before extension builds start. Extensions like the admin module copy output from web builds (e.g. dist/) into the bundle via include_assets. Running them in parallel causes a race condition where dist/ is empty or missing when the admin extension tries to copy it, resulting in: index_missing: index.html must be present in the bundle This splits the single renderConcurrent call into two sequential phases: web builds first, then extension builds.
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
When deploying an app with
[admin] static_root, the web build (e.g. Vite) and extension builds run in parallel via a singlerenderConcurrentcall. The admin extension'sinclude_assetsstep can attempt to copy files fromstatic_rootbefore the web build has finished populating it. Vite'semptyOutDir: truedeletesdist/at the start of its build, so the admin extension either sees a missing or empty directory and skips the copy. The result:Solution
Split the single
renderConcurrentcall into two sequential phases:Extensions within each phase still run concurrently with each other.
This makes the dependency between web builds and extensions explicit rather than relying on timing or polling.