Skip to content

Commit

Permalink
test: optimize memory usage when building storybook by using swc (#22975
Browse files Browse the repository at this point in the history
)

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.

---------

Co-authored-by: Howard Braham <howrad@gmail.com>
  • Loading branch information
davidmurdoch and HowardBraham authored Feb 15, 2024
1 parent 4d381e9 commit c6cb88e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ module.exports = {
},
framework: {
name: '@storybook/react-webpack5',
options: {},
options: {
builder: {
useSWC: true,
},
},
},
};
8 changes: 0 additions & 8 deletions ui/components/ui/icon/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ Use the `className` prop to add an additional class to the icon. This additional

<ArgsTable of={SunCheck} />

## Send/SwapIcon

<Canvas>
<Story id="components-ui-icon--send-swap-icon-story" />
</Canvas>

<ArgsTable of={SwapIconComponent} />

## Preloader

<Canvas>
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/icon/icon.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const IconItem = ({ Component }) => {
backgroundColor={BackgroundColor.backgroundDefault}
>
<Box marginBottom={2}>{Component}</Box>
<code>{`${Component.type.__docgenInfo.displayName}`}</code>
<code>{`${Component.type.name}`}</code>
</Card>
);
};
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/logo/logo.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
};
Expand Down

0 comments on commit c6cb88e

Please sign in to comment.