Skip to content

fix(public-docsite-v9-headless): fix root import in tailwind sandbox template#36065

Merged
dmytrokirpa merged 1 commit intomicrosoft:masterfrom
dmytrokirpa:fix/react-headless-components-exports-root-specifier
Apr 27, 2026
Merged

fix(public-docsite-v9-headless): fix root import in tailwind sandbox template#36065
dmytrokirpa merged 1 commit intomicrosoft:masterfrom
dmytrokirpa:fix/react-headless-components-exports-root-specifier

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

@dmytrokirpa dmytrokirpa commented Apr 27, 2026

Summary

  • The sandbox App template in tailwind-sandbox-template.js was importing Provider from the package root (@fluentui/react-headless-components-preview), but the package only exposes sub-path exports — there is no "." entry in its exports map.
  • Vite (and any bundler that respects the exports field) rejects bare-root imports when no "." specifier is defined, producing Missing "." specifier in "@fluentui/react-headless-components-preview" package.
  • Fixed by using the correct sub-path import: @fluentui/react-headless-components-preview/provider.

Reproduction

https://stackblitz.com/edit/eu9cefke?file=src%2Fexample.tsx

Test plan

  • Verify the StackBlitz sandbox no longer throws the Vite resolution error
  • Verify the tailwind sandbox template in Storybook renders correctly with the sub-path import

🤖 Generated with Claude Code

@dmytrokirpa dmytrokirpa requested a review from a team as a code owner April 27, 2026 15:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

📊 Bundle size report

✅ No changes found

…template

The sandbox App template was importing Provider from the package root which
caused Vite to fail with "Missing '.' specifier" since the package only
exposes sub-path exports. Fixed to use the correct sub-path import.

Reproduction: https://stackblitz.com/edit/eu9cefke?file=src%2Fexample.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dmytrokirpa dmytrokirpa force-pushed the fix/react-headless-components-exports-root-specifier branch from e96f1ea to a0d623a Compare April 27, 2026 15:59
@dmytrokirpa dmytrokirpa requested a review from a team as a code owner April 27, 2026 15:59
@dmytrokirpa dmytrokirpa changed the title fix(react-headless-components-preview): add root "." exports specifier fix(public-docsite-v9-headless): fix root import in tailwind sandbox template Apr 27, 2026
Comment thread apps/public-docsite-v9-headless/.storybook/preview.js
@dmytrokirpa dmytrokirpa self-assigned this Apr 27, 2026
@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@dmytrokirpa dmytrokirpa merged commit 8f8f9bf into microsoft:master Apr 27, 2026
12 checks passed
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