storybook/docs/snippets/common/storybook-babel-configuration-example.ts.mdx
2021-05-07 15:51:42 +01:00

15 lines
326 B
Plaintext

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