Skip to content

Commit

Permalink
chore(storybook): migrate to 5.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Sep 11, 2020
1 parent b41cc64 commit 50dbb92
Show file tree
Hide file tree
Showing 5 changed files with 3,875 additions and 4,688 deletions.
13 changes: 0 additions & 13 deletions .storybook/config.js

This file was deleted.

3 changes: 3 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
stories: ['../stories/index.js', '../stories/**/*.stories.*'],
};
14 changes: 8 additions & 6 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ packages.forEach(name => {
packagesAliases[name] = path.join(__dirname, '..', name, 'src');
});

module.exports = {
module: {
module.exports = async ({ config }) => {
config.module = {
rules: [
{
test: /\.css$/,
Expand Down Expand Up @@ -71,15 +71,17 @@ module.exports = {
use: [{ loader: 'file-loader', options: { name: '[name].[ext]' } }],
},
],
},
};

resolve: {
extensions: ['.ts', '.tsx', '.js', '.json', '.mjs'],
config.resolve = {
alias: {
...packagesAliases,
react: path.join(__dirname, '..', 'node_modules', 'react'),
'prop-types': path.join(__dirname, '..', 'node_modules', 'prop-types'),
lodash: path.join(__dirname, '..', 'node_modules', 'lodash'),
},
},
extensions: ['.ts', '.tsx', '.js', '.json', '.mjs'],
};

return config;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@babel/preset-react": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@babel/register": "7.11.5",
"@storybook/react": "^5.1.11",
"@storybook/react": "^5.3.21",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^10.4.9",
"@testing-library/react-hooks": "^3.4.1",
Expand Down
Loading

0 comments on commit 50dbb92

Please sign in to comment.