Skip to content

Commit

Permalink
build: update deps (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyum authored May 12, 2023
1 parent 9ae36ac commit db5650e
Show file tree
Hide file tree
Showing 8 changed files with 13,855 additions and 47,433 deletions.
22 changes: 12 additions & 10 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

module.exports = {
stories: [
"../src/App.stories.tsx",
Expand All @@ -11,21 +10,25 @@ module.exports = {
"@storybook/addon-essentials",
"storybook-addon-themes",
],
core: {
builder: "webpack5",
},
webpackFinal: async config => {
// Removing the global alias as it conflicts with the global npm pkg (https://github.com/storybookjs/storybook/issues/21242)
const { global, ...alias } = config.resolve.alias;
config.resolve.alias = alias;

addScssSupport(config);

return config;
},
framework: {
name: "@storybook/react",
}
name: "@storybook/react-webpack5",
options: {},
},
docs: {
autodocs: true,
},
};

function addScssSupport(config) {
config.plugins.push(new MiniCssExtractPlugin());

config.module.rules.push({
test: /\.module.scss$/,
use: [
Expand All @@ -41,10 +44,9 @@ function addScssSupport(config) {
"sass-loader",
],
});

config.module.rules.push({
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
exclude: /\.module\.scss$/,
});
}
}
Loading

0 comments on commit db5650e

Please sign in to comment.