Skip to content

feat(themes): serve the whole component dist tree in preview - #413

Draft
luis-almeida wants to merge 1 commit into
masterfrom
luis/GG-5267-preview-multi-asset
Draft

feat(themes): serve the whole component dist tree in preview#413
luis-almeida wants to merge 1 commit into
masterfrom
luis/GG-5267-preview-multi-asset

Conversation

@luis-almeida

@luis-almeida luis-almeida commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

A component's release tree is more than its entry. Lazy chunks and assets fetched relative to it have to resolve the same way locally as they do in production, otherwise preview cannot tell you whether a release will actually work.

Metadata now comes from the built component.json, so preview registers the version the bundle was built with instead of a hand-maintained source value. Previewing a component therefore requires a build first — the same requirement as serving its bundle. Component preview shipped in 1.3.0 but is Zendesk-internal and undocumented, so this changes it outright rather than carrying a compatibility shim.

Refs https://zendesk.atlassian.net/browse/GG-5267, zendesk/help_center#34657, zendesk/help-center-components#5

b139ab7 feat(themes): serve the whole component dist tree in preview

A component's release tree is more than its entry: lazy chunks and assets
fetched relative to it must resolve the same way locally as in production.
Only the entry is rewritten for livereload; everything else is served
verbatim.

Metadata now comes from the built component.json, so preview registers the
version the bundle was actually built with.

Detail

Checklist

  • 💂‍♂️ includes new unit and functional tests

A component's release tree is more than its entry: lazy chunks and assets
fetched relative to it must resolve the same way locally as in production.
Only the entry is rewritten for livereload; everything else is served
verbatim.

Metadata now comes from the built component.json, so preview registers the
version the bundle was actually built with.

preview
.it('should serve sibling dist/ assets verbatim', async () => {
const chunkResponse = await axios.get('http://0.0.0.0:9998/theme_components/request_list/1.0.0/chunks/extra-chunk.js')
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