Skip to content

Commit d40e832

Browse files
committed
Update Storybook to use Webpack 5
1 parent a8616ff commit d40e832

File tree

4 files changed

+1180
-987
lines changed

4 files changed

+1180
-987
lines changed

client/.storybook/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ const path = require('path');
22
const custom = require('../webpack.config');
33

44
module.exports = {
5+
core: {
6+
builder: 'webpack5',
7+
},
58
stories: [
69
'../app/stories/Index.stories.jsx',
710
'../app/stories/**/*.stories.@(jsx|mdx)',

client/package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@
6666
"@babel/preset-env": "^7.5.5",
6767
"@babel/preset-flow": "^7.14.5",
6868
"@babel/preset-react": "^7.14.5",
69-
"@storybook/addon-essentials": "^6.4.21",
70-
"@storybook/addon-links": "^6.4.21",
71-
"@storybook/addons": "^6.4.21",
72-
"@storybook/react": "^6.4.21",
69+
"@storybook/addon-essentials": "^6.5.12",
70+
"@storybook/addon-links": "^6.5.12",
71+
"@storybook/addons": "^6.5.12",
72+
"@storybook/builder-webpack5": "^6.5.12",
73+
"@storybook/manager-webpack5": "^6.5.12",
74+
"@storybook/react": "^6.5.12",
7375
"@testing-library/jest-dom": "^5.10.0",
7476
"@testing-library/react": "^11.0.4",
7577
"@testing-library/user-event": "^12.1.7",

client/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
99
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
1010
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
1111
const webpackConfigLoader = require('react-on-rails/webpackConfigLoader');
12-
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
12+
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
1313
const TerserPlugin = require('terser-webpack-plugin');
1414
const webpack = require('webpack');
1515

0 commit comments

Comments
 (0)