feat(themes): serve the whole component dist tree in preview - #413
Draft
luis-almeida wants to merge 1 commit into
Draft
feat(themes): serve the whole component dist tree in preview#413luis-almeida wants to merge 1 commit into
luis-almeida wants to merge 1 commit into
Conversation
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') |
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.
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
b139ab7feat(themes): serve the whole component dist tree in previewA 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