Skip to content

Commit 2ed3bdd

Browse files
committed
update deps, tweak config for newer deps
1 parent 470dd49 commit 2ed3bdd

13 files changed

+10983
-7392
lines changed

.storybook/config.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

.storybook/main.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = {
2+
stories: ['../src/**/*.stories.mdx'],
3+
addons: [
4+
'@storybook/addon-docs',
5+
'@storybook/addon-essentials',
6+
{
7+
name: '@storybook/addon-postcss',
8+
options: {
9+
styleLoaderOptions: {},
10+
cssLoaderOptions: {
11+
modules: true,
12+
sourceMap: true,
13+
importLoaders: 1,
14+
},
15+
postcssLoaderOptions: {
16+
implementation: require('postcss')
17+
},
18+
},
19+
}
20+
],
21+
webpackFinal: async (config) => {
22+
// Finds and removes the old CSS rule.
23+
const cssRuleIndex = config.module.rules.findIndex(rule => rule.test.toString().includes('.css'));
24+
if (cssRuleIndex !== -1) {
25+
//config.module.rules.splice(cssRuleIndex, 1);
26+
}
27+
28+
//console.log(11, config.module.rules[cssRuleIndex])
29+
30+
// Tweaks needed for PostCSS and CSS modules.
31+
// config.module.rules.push({
32+
// test: /\.css$/,
33+
// use: [
34+
// 'style-loader',
35+
// {
36+
// loader: 'css-loader',
37+
// options: {
38+
// modules: true,
39+
// importLoaders: 1
40+
// }
41+
// },
42+
// 'postcss-loader'
43+
// ]
44+
// });
45+
46+
// Returns the modified config.
47+
return config;
48+
}
49+
};

.storybook/presets.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

.storybook/webpack.config.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)