-
Notifications
You must be signed in to change notification settings - Fork 13.1k
chore(web-ui-registration): Review build configuration #37584
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
Merged
Changes from all commits
Commits
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], | ||
| "ignorePatterns": ["**/dist"] | ||
| "ignorePatterns": ["dist", "storybook-static", "!.storybook"] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "module": "ESNext" | ||
| }, | ||
| "include": ["./src/**/*"], | ||
| "exclude": ["./src/**/*.spec.ts", "./src/**/*.stories.tsx"] | ||
| } |
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify SWC compiler compatibility and version constraint.
The switch from Babel to SWC for Storybook compilation is a significant tooling change. Additionally, the version constraint changed from
^3.0.6to~3.0.0(more restrictive).Ensure that:
~3.0.0) is intentionalRun the following script to verify the package version and check for any known issues:
Also verify the Storybook build works correctly:
🏁 Script executed:
Length of output: 65
🏁 Script executed:
Length of output: 495
🏁 Script executed:
Length of output: 584
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 417
🏁 Script executed:
Length of output: 183
🏁 Script executed:
Length of output: 223
🌐 Web query:
💡 Result:
Short answer: Yes — @storybook/addon-webpack5-compiler-swc uses swc-loader as Storybook's TS/JS compiler and supports .ts/.tsx files, but you must configure SWC/TSX JSX settings (especially React automatic runtime) and Storybook's TypeScript options appropriately.
What to do:
References:
Length of output: 111
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 170
🏁 Script executed:
Length of output: 39
Length of output: 0
🏁 Script executed:
Length of output: 350
🏁 Script executed:
Length of output: 202
Length of output: 762
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 0
Configure SWC JSX runtime in framework options.
The migration from Babel to SWC requires explicit JSX runtime configuration. Per SWC documentation, the framework options in
main.tsmust includejsc.transform.react.runtimesettings.Update
packages/web-ui-registration/.storybook/main.tsframework options from empty{}to:Also verify
tsconfig.jsonaligns JSX setting with the SWC runtime chosen above (e.g.,"jsx": "react-jsx"for automatic runtime).🤖 Prompt for AI Agents