Skip to content

Commit b395cc6

Browse files
authored
Merge c0daf21 into 15d014b
2 parents 15d014b + c0daf21 commit b395cc6

7 files changed

Lines changed: 2471 additions & 5039 deletions

File tree

docs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

docs/.storybook/main.js

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1+
import sass from 'sass'
2+
import {createRequire} from 'module'
3+
import {fileURLToPath} from 'url'
4+
5+
const require = createRequire(import.meta.url)
6+
17
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
28
const config = {
39
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
410
addons: [
5-
'@storybook/addon-links',
6-
'@storybook/addon-essentials',
7-
'@storybook/addon-interactions',
11+
'@storybook/addon-webpack5-compiler-babel',
12+
'@storybook/addon-docs',
813
'storybook-addon-pseudo-states',
9-
'@storybook/addon-storysource',
1014
'@geometricpanda/storybook-addon-badges',
11-
{
12-
name: '@storybook/addon-styling',
13-
options: {
14-
sass: {
15-
implementation: require('sass'),
16-
},
17-
},
18-
},
1915
],
2016
framework: {
2117
name: '@storybook/react-webpack5',
@@ -25,5 +21,30 @@ const config = {
2521
autodocs: 'tag',
2622
},
2723
staticDirs: ['../stories/static'],
24+
async webpackFinal(webpackConfig) {
25+
// Alias @storybook/blocks to the v10-compatible addon-docs/blocks
26+
webpackConfig.resolve = webpackConfig.resolve || {}
27+
webpackConfig.resolve.alias = {
28+
...webpackConfig.resolve.alias,
29+
'@storybook/blocks': fileURLToPath(import.meta.resolve('@storybook/addon-docs/blocks')),
30+
}
31+
32+
// Add SCSS support using sass-loader
33+
webpackConfig.module.rules.push({
34+
test: /\.s[ac]ss$/,
35+
use: [
36+
require.resolve('style-loader'),
37+
require.resolve('css-loader'),
38+
{
39+
loader: require.resolve('sass-loader'),
40+
options: {
41+
implementation: sass,
42+
},
43+
},
44+
],
45+
sideEffects: true,
46+
})
47+
return webpackConfig
48+
},
2849
}
2950
export default config

docs/.storybook/manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {addons} from '@storybook/manager-api'
1+
import {addons} from 'storybook/manager-api'
22
import theme from './theme'
33

44
addons.setConfig({

docs/.storybook/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)