-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: optimize memory usage when building storybook by using swc #22975
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
383253e
to
efa54b4
Compare
Builds ready [efa54b4]
Page Load Metrics (1971 卤 233 ms)
Bundle size diffs
|
@@ -45,7 +45,7 @@ const LogoItem = ({ Component }) => { | |||
backgroundColor={BackgroundColor.backgroundDefault} | |||
> | |||
<Box marginBottom={2}>{Component}</Box> | |||
<Text>{`${Component.type.__docgenInfo.displayName}`}</Text> | |||
<Text>{`${Component.type.name}`}</Text> | |||
</Card> |
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.
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.
I'm not completely sure, but once @davidmurdoch turned on useSWC, this stopped working without changing Component.type.__docgenInfo.displayName
to Component.type.name
.
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.
LGTM! Thanks for these fixes 馃檹
Building storybook in CI seems to fail often -- probably due to running out of memory. Changing the compiler to swc might help (according to storybookjs/storybook#6408 (comment)).
I don't know what the ramifications of this change may be (I don't even know what storybook is for 馃槄). So someone with knowledge here should review this PR.