Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
Fix storybook build (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirefly authored Feb 20, 2020
1 parent d120186 commit bcea1ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"lodash.chunk": "4.2.0",
"lodash.debounce": "4.0.8",
"loglevel": "1.6.7",
"mini-css-extract-plugin": "0.9.0",
"node-sass": "4.13.1",
"prop-types": "15.7.2",
"query-string": "6.10.1",
Expand Down Expand Up @@ -161,4 +162,4 @@
"!src/index.tsx"
]
}
}
}
9 changes: 9 additions & 0 deletions stories/setup/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = ({ config, mode }) => {
config.module.rules.push({
test: /\.(ts|tsx)$/,
Expand All @@ -8,5 +10,12 @@ module.exports = ({ config, mode }) => {
});
config.resolve.extensions.push('.ts', '.tsx');

// See https://github.com/storybookjs/storybook/issues/9777
config.plugins.push(
new MiniCssExtractPlugin({
filename: '[name].[contenthash].css',
}),
);

return config;
};

0 comments on commit bcea1ea

Please sign in to comment.