Skip to content

Commit def54b1

Browse files
committed
Remove @storybook/preset-create-react-app
1 parent 45d7cf5 commit def54b1

File tree

3 files changed

+9651
-20327
lines changed

3 files changed

+9651
-20327
lines changed

.storybook/main.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,34 @@ const config = {
22
stories: ['./**/*.stories.@(js|jsx|ts|tsx|mdx)'],
33

44
addons: [
5-
'@storybook/addon-essentials',
6-
'@storybook/preset-create-react-app'
5+
'@storybook/addon-essentials'
76
],
87

98
webpackFinal: async (config, { configType }) => {
10-
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
11-
// You can change the configuration based on that.
12-
// 'PRODUCTION' is used when building the static version of storybook.
13-
149
config.module.rules = config.module.rules.filter(rule => {
1510
if (!rule.test) return true;
1611
return !rule.test.test(".scss");
1712
});
13+
config.module.rules.push({
14+
test: /\.(js|jsx)$/,
15+
exclude: /node_modules/,
16+
use: {
17+
loader: 'babel-loader',
18+
options: {
19+
presets: ['@babel/preset-env', '@babel/preset-react']
20+
}
21+
}
22+
});
23+
config.module.rules.push({
24+
test: /\.scss$/,
25+
use: [
26+
'style-loader',
27+
'css-loader',
28+
'sass-loader'
29+
],
30+
});
31+
32+
config.resolve.extensions.push('.js', '.jsx', '.ts', '.tsx');
1833

1934
return config;
2035
},

0 commit comments

Comments
 (0)