fix(dev): Register static assets without identifier for relative src paths#7502
Merged
Merged
Conversation
85f9b3b to
8791cd8
Compare
isaacroldan
approved these changes
May 11, 2026
8791cd8 to
3670948
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3670948 to
98b390c
Compare
Static assets were registered at target/identifier/file (e.g., target/assets/file), but relative paths like src='./cat.png' resolve to target/file. Changes: 1. Dev server: Register assets at target/file instead of target/identifier/file 2. Deploy: Add destination: 'assets' so assets copy to assets/ subdirectory Fixes #5285
98b390c to
f9da828
Compare
Contributor
|
| Changeset | Package |
|---|---|
thin-webs-notice.md |
'@shopify/plugin-did-you-mean': major |
thin-webs-notice.md |
'@shopify/plugin-cloudflare': major |
thin-webs-notice.md |
'@shopify/create-app': major |
thin-webs-notice.md |
'@shopify/cli-kit': major |
thin-webs-notice.md |
'@shopify/store': major |
thin-webs-notice.md |
'@shopify/theme': major |
thin-webs-notice.md |
'@shopify/app': major |
thin-webs-notice.md |
'@shopify/cli': major |
thin-webs-notice.md |
'@shopify/e2e': major |
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.

Summary
Static assets in UI extensions weren't resolving correctly when using relative paths like
src='./cat.png'.Root Cause
Assets were registered at
target/identifier/file(e.g.,target/assets/Shoe1.png), but relative paths likesrc='./Shoe1.png'resolve totarget/Shoe1.png.Changes
Dev server
Register assets at
target/fileinstead oftarget/identifier/file:Deploy
Add
destination: 'assets'to theinclude_assetsstep so files are copied toassets/subdirectory with correct manifest paths.Note
A corresponding server-side fix is needed to use the full manifest paths when constructing CDN URLs.
Fixes #5285