Skip to content

Commit

Permalink
Merge pull request #25842 from storybookjs/docs_minor_webpack_babel_s…
Browse files Browse the repository at this point in the history
…wc_fix

Docs: Minor SWC docs polish
  • Loading branch information
jonniebigodes authored Feb 1, 2024
2 parents a72905c + 23ed540 commit d035de1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/api/main-config-swc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Parent: [main.js|ts configuration](./main-config.md)

Type: `(config: swc.Options, options: Options) => swc.Options | Promise<swc.Options>`

Customize Storybook's [SWC](https://swc.rs/) setup.
Customize Storybook's [SWC](https://swc.rs/) setup for Webpack-based projects enabled via the [`@storybook/addon-webpack5-compiler-swc`](https://storybook.js.org/addons/@storybook/addon-webpack5-compiler-swc) addon based on the supported [frameworks](../configure/frameworks.md), except Angular, Create React App, Ember.js and Next.js.

<!-- prettier-ignore-start -->

Expand Down
13 changes: 1 addition & 12 deletions docs/configure/compilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ Javascript compilers are essential in optimizing and transforming code, enhancin

## SWC

SWC is a fast, highly extensible tool for compiling and bundling modern JavaScript applications. Powered by [Rust](https://www.rust-lang.org/), it improves performance and reduces build times. Storybook includes a built-in integration with SWC, allowing zero-configuration setup and built-in types for APIs. If you've initialized Storybook in a Webpack-based project with any of the supported [frameworks](./frameworks.md), except Angular, it will automatically use SWC as its default, providing you with faster loading time. However, if you're upgrading from a previous version of Storybook, you may need to opt-in to use SWC by adjusting your Storybook configuration file (i.e., `.storybook/main.js|ts`) as follows:

<!-- prettier-ignore-start -->

<CodeSnippets
paths={[
'common/main-config-framework-options-builder-use-swc.js.mdx',
'common/main-config-framework-options-builder-use-swc.ts.mdx',
]}
/>

<!-- prettier-ignore-end -->
SWC is a fast, highly extensible tool for compiling and bundling modern JavaScript applications. Powered by [Rust](https://www.rust-lang.org/), it improves performance and reduces build times. Storybook includes a built-in integration with SWC, allowing zero-configuration setup and built-in types for APIs. If you've initialized Storybook in a Webpack-based project with any of the supported [frameworks](./frameworks.md), except Angular, Create React App, Ember.js and Next.js, it will automatically use SWC as its default, providing you with faster loading time.

<Callout variant="info">

Expand Down

0 comments on commit d035de1

Please sign in to comment.