storybook/docs/configure/compilers.md
2023-11-24 14:51:41 +00:00

1.3 KiB

title
Compiler support

SWC

SWC is a fast, highly extensible tooling for compiling and bundling modern JavaScript applications. Powered by Rust, it provides something something. Storybook provides an integrated experience with SWC, including 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 except Angular it will automatically use SWC as the default, providing you with with faster loading times and improved performance. However, if you want to opt-out of SWC, you can do so by adjusting your Storybook configuration file (i.e., .storybook/main.js|ts) as follows:

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

Babel

Babel is a JavaScript compiler widely used in modern frontend development to help

Troubleshooting

<CodeSnippets paths={[ 'common/main-config-swc-jsx-transform.js.mdx', 'common/main-config-swc-jsx-transform.ts.mdx', ]} />