Repository navigation
fix: add 'use client' to barrel index.ts files for dist path - #816
Merged
Merged
Conversation
With splitting: false, tsup inlines all code into each entry point. Two fixes needed: 1. Barrel index.ts files need 'use client' since they're the entry points 2. Post-build script (fix-use-client-dist.mjs) moves the directive to line 1 in dist files — tsup/babel may insert helpers before it Fixes sandbox build failure in #806.
cixzhang
force-pushed
the
navi/fix/barrel-use-client
branch
from
March 22, 2026 08:02
b435a8f to
a85144c
Compare
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
AspectRatio · View in Storybook
Avatar · View in Storybook
Badge · View in Storybook
Banner · View in Storybook
Breadcrumbs · View in Storybook
Button · View in Storybook
Calendar · View in Storybook
Card · View in Storybook
Center · View in Storybook
CheckboxInput · View in Storybook
Collapsible · View in Storybook
DateInput · View in Storybook
Dialog · View in Storybook
Divider · View in Storybook
DropdownMenu · View in Storybook
Field · View in Storybook
FormLayout · View in Storybook
Grid · View in Storybook
HoverCard · View in Storybook
Icon · View in Storybook
Layer · View in Storybook
Layout · View in Storybook
Link · View in Storybook
List · View in Storybook
MobileNav · View in Storybook
MoreMenu · View in Storybook
NumberInput · View in Storybook
OverflowList · View in Storybook
Pagination · View in Storybook
Popover · View in Storybook
PowerSearch · View in Storybook
ProgressBar · View in Storybook
RadioList · View in Storybook
Section · View in Storybook
SegmentedControl · View in Storybook
Selector · View in Storybook
SideNav · View in Storybook
Skeleton · View in Storybook
Slider · View in Storybook
Spinner · View in Storybook
Switch · View in Storybook
TabList · View in Storybook
Table · View in Storybook
Text · View in Storybook
TextArea · View in Storybook
TextInput · View in Storybook
TimeInput · View in Storybook
Tokenizer · View in Storybook
Tooltip · View in Storybook
TopNav · View in Storybook
TreeList · View in Storybook
Typeahead · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 11 accessibility violation(s) found — 1 critical, 8 serious, 2 moderate. XDSBanner - 1 issue(s)
XDSCalendar - 1 issue(s)
XDSCheckboxInput - 1 issue(s)
XDSIcon - 1 issue(s)
XDSLayout - 1 issue(s)
XDSList - 1 issue(s)
XDSPagination - 1 issue(s)
XDSSideNav - 1 issue(s)
XDSTabList - 1 issue(s)
Selection - 1 issue(s)
XDSText - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
With splitting: false, tsup inlines all code into each entry point. Two fixes needed: 1. Barrel index.ts files need 'use client' since they're the entry points 2. Post-build script (fix-use-client-dist.mjs) moves the directive to line 1 in dist files — tsup/babel may insert helpers before it Fixes sandbox build failure in #806. Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
With splitting: false, tsup inlines all code into each entry point. Two fixes needed: 1. Barrel index.ts files need 'use client' since they're the entry points 2. Post-build script (fix-use-client-dist.mjs) moves the directive to line 1 in dist files — tsup/babel may insert helpers before it Fixes sandbox build failure in #806. Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
With splitting: false, tsup inlines all code into each entry point. Two fixes needed: 1. Barrel index.ts files need 'use client' since they're the entry points 2. Post-build script (fix-use-client-dist.mjs) moves the directive to line 1 in dist files — tsup/babel may insert helpers before it Fixes sandbox build failure in #806.
4 tasks done
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.
With
splitting: false(#815), tsup inlines all code into each entry point. The'use client'directive must be on the barrelindex.ts(the entry point) — tsup doesn't propagate directives from inlined modules.Adds
'use client'to 56 barrel files. Fixes the sandbox build failure in #806.