Skip to content

Commit

Permalink
[DDW-596] Upgraded to storybook 6
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmain committed Dec 23, 2021
1 parent 5474c9a commit fadfb7c
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 133 deletions.
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@
"@babel/register": "7.0.0",
"@dump247/storybook-state": "1.6.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.3",
"@storybook/addon-actions": "5.3.14",
"@storybook/addon-knobs": "5.3.14",
"@storybook/addon-links": "5.3.14",
"@storybook/addons": "5.3.14",
"@storybook/core": "5.3.14",
"@storybook/react": "5.3.14",
"@storybook/addon-actions": "6.4.9",
"@storybook/addon-knobs": "6.4.0",
"@storybook/addon-links": "6.4.9",
"@storybook/addons": "6.4.9",
"@storybook/builder-webpack5": "^6.4.9",
"@storybook/core": "6.4.9",
"@storybook/manager-webpack5": "^6.4.9",
"@storybook/react": "6.4.9",
"@testing-library/jest-dom": "5.15.1",
"@testing-library/react": "12.1.2",
"asar": "2.1.0",
Expand Down Expand Up @@ -177,7 +179,7 @@
"transform-loader": "0.2.4",
"utf-8-validate": "5.0.2",
"webdriverio": "5.18.7",
"webpack": "5.64.4",
"webpack": "5.65.0",
"webpack-cli": "4.9.1",
"webpack-dev-server": "4.6.0",
"ws": "7.3.1",
Expand Down
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');

module.exports = {
alias: {
Renderer: path.resolve(__dirname, 'source/renderer'),
},
stories: ['./stories/**/*.stories.@(js|mdx|ts)'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/builder-webpack5',
'@storybook/manager-webpack5',
'./addons/DaedalusMenu/register',
],
core: {
builder: 'webpack5',
},
// Make whatever fine-grained changes you need
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Make whatever fine-grained changes you need
config.module.rules.push({
test: /\.scss/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
localIdentName: '[name]_[local]',
},
sourceMap: true,
importLoaders: true,
},
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
implementation: require.resolve('sass'),
},
},
{
loader: 'babel-loader',
options: {
cacheCompression: false,
cacheDirectory: true,
plugins: [require.resolve('react-refresh/babel')].filter(Boolean),
},
},
],
});

// Return the altered config
return config;
},
};
126 changes: 0 additions & 126 deletions storybook/webpack.config.js

This file was deleted.

0 comments on commit fadfb7c

Please sign in to comment.