Skip to content

Run web build commands during deploy for hosted apps#7208

Open
MitchLillie wants to merge 1 commit intomainfrom
cx-ensure-build-runs-before-deploy
Open

Run web build commands during deploy for hosted apps#7208
MitchLillie wants to merge 1 commit intomainfrom
cx-ensure-build-runs-before-deploy

Conversation

@MitchLillie
Copy link
Copy Markdown
Contributor

@MitchLillie MitchLillie commented Apr 6, 2026

Closes https://github.com/shop/issues-admin-extensibility/issues/2398

Summary

  • bundleAndBuildExtensions now runs web.toml build commands concurrently alongside extension bundling during shopify app deploy
  • Scoped to webs that explicitly define a build command — extension-only apps and dev-only webs are unaffected
  • Respects --no-build / skipBuild flag

Root cause: deploy called bundleAndBuildExtensions (extensions only) but never invoked buildWeb('build', ...), unlike shopify app build which does. Users had to manually run build before deploy.

Closes shop/issues-admin-extensibility#2398

Manual test instructions

Setup: You need an app with a web/ directory and a web.toml that defines a build command:

# web/web.toml
[commands]
dev = "npm run dev"
build = "npm run build"

Test: build command runs on deploy

  1. Make a change to your web app source that only reflects after a build
  2. Run shopify app deploy
  3. Confirm your build command output appears in the concurrent output alongside extensions
  4. Confirm the deploy succeeds

Test: --no-build skips web build

  1. Run shopify app deploy --no-build
  2. Confirm the build command does NOT run (no web-prefixed process in output)

Test: extension-only apps unaffected

  1. Use an app whose web.toml has no build command (or no webs at all)
  2. Run shopify app deploy — confirm no new web-prefixed process appears in output

Test plan

  • runs web build command concurrently with extensions when build command is defined
  • skips web build for webs without a build command defined
  • skips web build command when skipBuild is true
  • Manual test with a hosted app
  • Manual test with --no-build

🤖 Generated with Claude Code

@MitchLillie MitchLillie marked this pull request as ready for review April 6, 2026 23:15
@MitchLillie MitchLillie requested a review from a team as a code owner April 6, 2026 23:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

When a web.toml defines a `build` command, deploy now runs it
concurrently alongside extension bundling. Previously users had
to manually run `shopify app build` before `shopify app deploy`
to ensure web assets were up to date.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@MitchLillie MitchLillie force-pushed the cx-ensure-build-runs-before-deploy branch from ebb92da to e31511b Compare April 7, 2026 17:11
@MitchLillie MitchLillie requested a review from a team as a code owner April 7, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant