storybook/docs/snippets/common/storybook-babel-configuration-example.ts.mdx
2022-05-12 10:10:41 +02:00

13 lines
271 B
Plaintext

```ts
import { TransformOptions } from '@babel/core';
export function babelDefault(config: TransformOptions) {
return {
...config,
plugins: [
...config.plugins,
[require.resolve('@babel/plugin-transform-react-jsx'), {}, 'preset'],
],
};
}
```