Skip to content

Commit 05bb86f

Browse files
chore: update storybook to 5.2.8 (#16)
Co-authored-by: Louis Lagrange <lagrange.louis@gmail.com>
1 parent 5cd7168 commit 05bb86f

File tree

3 files changed

+3345
-1696
lines changed

3 files changed

+3345
-1696
lines changed

docs/.storybook/webpack.config.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
const path = require('path');
22
const webpack = require('webpack');
33

4-
module.exports = (storybookBaseConfig, configType) => {
5-
const DEV = configType === 'DEVELOPMENT';
4+
module.exports = ({config, mode}) => {
5+
const DEV = mode === 'DEVELOPMENT';
66

77
const libDirectory = path.resolve(__dirname, '../../');
88

9-
storybookBaseConfig.module.rules.push({
9+
config.module.rules.push({
1010
test: /\.js$/,
1111
include: [
1212
path.resolve(libDirectory, 'src'),
13+
path.resolve(libDirectory, 'docs'),
1314
],
1415
use: {
1516
loader: 'babel-loader',
@@ -21,19 +22,19 @@ module.exports = (storybookBaseConfig, configType) => {
2122
}
2223
});
2324

24-
storybookBaseConfig.plugins.push(
25+
config.plugins.push(
2526
new webpack.DefinePlugin({
2627
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
2728
'process.env.__REACT_NATIVE_DEBUG_ENABLED__': DEV
2829
})
2930
);
3031

31-
storybookBaseConfig.resolve.extensions = ['.web.js', '.js', '.json', '.web.jsx', '.jsx'];
32+
config.resolve.extensions = ['.web.js', '.js', '.json', '.web.jsx', '.jsx'];
3233

33-
storybookBaseConfig.resolve.alias = {
34+
config.resolve.alias = {
3435
'react-native$': 'react-native-web',
3536
'lottie-react-native': path.join(__dirname, '../../src/')
3637
};
3738

38-
return storybookBaseConfig;
39+
return config;
3940
};

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"release": "yarn build && git checkout gh-pages && rm -rf ../storybook && mv dist ../storybook && git add -A && git commit -m \"Storybook deploy\" && git push origin gh-pages && git checkout -"
66
},
77
"dependencies": {
8-
"@storybook/addon-options": "^4.1.11",
9-
"@storybook/react": "^4.1.11"
8+
"@storybook/addon-options": "^5.2.8",
9+
"@storybook/react": "^5.2.8"
1010
}
1111
}

0 commit comments

Comments
 (0)