-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: update CDN bundle configurations, enable setTheme on globalThis #36113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chrisdholt
merged 11 commits into
microsoft:master
from
chrisdholt:users/chhol/migrate-to-esbuild-for-bundle-fix-theme-exports
May 8, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
25112bb
fix: migrate to esbuild for CDN bundle, enable setTheme on globalThis
chrisdholt cbb4890
update to support a slim bundle and an everything bundle
chrisdholt e4d2a96
revert back to rollup
chrisdholt 29e5e1f
remove use of setTheme in vr tests
chrisdholt b17060c
ignore setTheme types in storybook preview
chrisdholt f6ec842
use fast-tagged-templates dep
chrisdholt c444716
deduplicate yarn.lock
chrisdholt d656f4e
remove transform fragments
chrisdholt e088b3f
move side-effectul component registrations to new define-all.js file
chrisdholt a56f50d
move setTheme to globalThis.Fluent
chrisdholt 2d30680
fix test harness setTheme reference on window
chrisdholt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
change/@fluentui-web-components-753b509c-f103-4d8f-8b15-4a88a784dd81.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "fix: migrate to esbuild for CDN bundle, enable setTheme on globalThis", | ||
| "packageName": "@fluentui/web-components", | ||
| "email": "13071055+chrisdholt@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import './accordion-item/define.js'; | ||
| import './accordion/define.js'; | ||
| import './anchor-button/define.js'; | ||
| import './avatar/define.js'; | ||
| import './badge/define.js'; | ||
| import './button/define.js'; | ||
| import './checkbox/define.js'; | ||
| import './compound-button/define.js'; | ||
| import './counter-badge/define.js'; | ||
| import './dialog/define.js'; | ||
| import './dialog-body/define.js'; | ||
| import './divider/define.js'; | ||
| import './drawer/define.js'; | ||
| import './drawer-body/define.js'; | ||
| import './dropdown/define.js'; | ||
| import './field/define.js'; | ||
| import './image/define.js'; | ||
| import './label/define.js'; | ||
| import './link/define.js'; | ||
| import './listbox/define.js'; | ||
| import './menu-button/define.js'; | ||
| import './menu-item/define.js'; | ||
| import './menu-list/define.js'; | ||
| import './menu/define.js'; | ||
| import './message-bar/define.js'; | ||
| import './option/define.js'; | ||
| import './progress-bar/define.js'; | ||
| import './radio-group/define.js'; | ||
| import './radio/define.js'; | ||
| import './rating-display/define.js'; | ||
| import './slider/define.js'; | ||
| import './spinner/define.js'; | ||
| import './switch/define.js'; | ||
| import './tab/define.js'; | ||
| import './tablist/define.js'; | ||
| import './textarea/define.js'; | ||
| import './text-input/define.js'; | ||
| import './text/define.js'; | ||
| import './toggle-button/define.js'; | ||
| import './tooltip/define.js'; | ||
| import './tree/define.js'; | ||
| import './tree-item/define.js'; |
|
chrisdholt marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import './define-all.js'; | ||
|
|
||
| // import setTheme for export on globalThis for CDN | ||
| import { setTheme } from './theme/index.js'; | ||
|
|
||
| // Expose all exports from index.ts | ||
| export * from './index.js'; | ||
|
|
||
| // Expose setTheme under Fluent namespace on globalThis for CDN/script-tag consumers | ||
| // @ts-expect-error - CDN bundle intentionally sets globals | ||
| globalThis.Fluent = { ...globalThis.Fluent, setTheme }; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,8 @@ | ||
| import './accordion-item/define.js'; | ||
| import './accordion/define.js'; | ||
| import './anchor-button/define.js'; | ||
| import './avatar/define.js'; | ||
| import './badge/define.js'; | ||
| import './button/define.js'; | ||
| import './checkbox/define.js'; | ||
| import './compound-button/define.js'; | ||
| import './counter-badge/define.js'; | ||
| import './dialog/define.js'; | ||
| import './dialog-body/define.js'; | ||
| import './divider/define.js'; | ||
| import './drawer/define.js'; | ||
| import './drawer-body/define.js'; | ||
| import './dropdown/define.js'; | ||
| import './field/define.js'; | ||
| import './image/define.js'; | ||
| import './label/define.js'; | ||
| import './link/define.js'; | ||
| import './listbox/define.js'; | ||
| import './menu-button/define.js'; | ||
| import './menu-item/define.js'; | ||
| import './menu-list/define.js'; | ||
| import './menu/define.js'; | ||
| import './message-bar/define.js'; | ||
| import './option/define.js'; | ||
| import './progress-bar/define.js'; | ||
| import './radio-group/define.js'; | ||
| import './radio/define.js'; | ||
| import './rating-display/define.js'; | ||
| import './slider/define.js'; | ||
| import './spinner/define.js'; | ||
| import './switch/define.js'; | ||
| import './tab/define.js'; | ||
| import './tablist/define.js'; | ||
| import './textarea/define.js'; | ||
| import './text-input/define.js'; | ||
| import './text/define.js'; | ||
| import './toggle-button/define.js'; | ||
| import './tooltip/define.js'; | ||
| import './tree/define.js'; | ||
| import './tree-item/define.js'; | ||
| export { setTheme } from './theme/set-theme.js'; | ||
| import './define-all.js'; | ||
|
|
||
| // import setTheme for export on globalThis for CDN | ||
| import { setTheme } from './theme/index.js'; | ||
|
|
||
| // Expose setTheme under Fluent namespace on globalThis for CDN/script-tag consumers | ||
| // @ts-expect-error - CDN bundle intentionally sets globals | ||
| globalThis.Fluent = { ...globalThis.Fluent, setTheme }; |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.