Skip to content

Asset pipeline flow for hosted static app#6806

Open
elanalynn wants to merge 2 commits intomainfrom
proj-48450/asset-pipeline-for-hosted-apps
Open

Asset pipeline flow for hosted static app#6806
elanalynn wants to merge 2 commits intomainfrom
proj-48450/asset-pipeline-for-hosted-apps

Conversation

@elanalynn
Copy link
Contributor

@elanalynn elanalynn commented Jan 30, 2026

DEPENDS ON https://github.com/shop/world/pull/382743 TO SHIP FIRST

WHY are these changes introduced?

Related to Hosted app project.

Related to https://github.com/shop/world/pull/382743

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

WHAT is this pull request doing?

This PR introduces the asset pipeline flow for hosted static apps, enabling static asset copying during the build process.

  • New hosted_app specification (app_config_hosted_app_home.ts): Adds a configuration extension specification for hosted apps with a static_root field
  • New static_app build mode: Extends the build config modes to include static_app, which triggers static asset copying
  • Enhanced config extension specifications:
    • Added optional buildConfig and copyStaticAssets parameters to createConfigExtensionSpecification()
    • Config extensions can now define custom build behavior

How it works

When a hosted app defines a static_root in its configuration:

  1. The hosted_app specification is loaded with build mode static_app
  2. During build, copyStaticAssets() is invoked
  3. Contents from the configured static_root directory are copied to the output directory

How to test your changes?

  • Configure a hosted app with static_root pointing to a static assets directory
  • Run shopify app deploy and verify assets are copied to the output directory - .shopify/deploy-bundle
  • Verify deploy works when static_root is not specified
  • TODO: Verify appropriate error handling when source directory doesn't exist

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.9% 14565/18459
🟡 Branches 73.24% 7227/9868
🟡 Functions 79.1% 3706/4685
🟡 Lines 79.25% 13771/17376

Test suite run success

3780 tests passing in 1460 suites.

Report generated by 🧪jest coverage report action from ae0d089

@elanalynn elanalynn force-pushed the proj-48450/asset-pipeline-for-hosted-apps branch from e165a9d to 5b7340f Compare January 30, 2026 22:26
@alfonso-noriega alfonso-noriega force-pushed the proj-48450/asset-pipeline-for-hosted-apps branch from cd9fc6e to 4dd73b7 Compare February 10, 2026 16:01
Copy link
Contributor

@elanalynn elanalynn force-pushed the proj-48450/asset-pipeline-for-hosted-apps branch from 4a80cd2 to ae0d089 Compare February 13, 2026 16:36
@elanalynn elanalynn marked this pull request as ready for review February 13, 2026 16:37
@elanalynn elanalynn requested a review from a team as a code owner February 13, 2026 16:37
@github-actions
Copy link
Contributor

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.

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.

2 participants