Skip to content

Commit 26ec0ac

Browse files
committed
New JSX transform fix for storybook
1 parent a2e2875 commit 26ec0ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.storybook/webpack.config.js

+18
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,23 @@ module.exports = async ({config, mode}) => {
66
use: ['style-loader', 'css-loader', 'sass-loader'],
77
include: path.resolve(__dirname, '../'),
88
});
9+
config.module.rules.push({
10+
test: /\.js?$/,
11+
use: {
12+
loader: 'babel-loader',
13+
options: {
14+
presets: [
15+
[
16+
'@babel/preset-react',
17+
{
18+
runtime: 'automatic',
19+
},
20+
],
21+
'@babel/env',
22+
],
23+
},
24+
},
25+
exclude: [/node_modules/],
26+
});
927
return config;
1028
};

0 commit comments

Comments
 (0)