Skip to content

Commit

Permalink
fix: update config to handle stories.tsx (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhu authored Dec 3, 2019
1 parent 978a6eb commit 939a701
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = ({ config }) => {
config.resolve.extensions.push('.ts', '.tsx');

config.module.rules.push({
test: /stories.js$/u,
loaders: [require.resolve('@storybook/addon-storysource/loader')],
test: /stories.tsx$/u,
loader: require.resolve('@storybook/source-loader'),
enforce: 'pre'
});

Expand All @@ -39,6 +39,10 @@ module.exports = ({ config }) => {
{
loader: 'ts-loader',
options: {
// Temporarily ignore implicit any warnings caused by source-loader.
// Ignoring 7005 can be removed when the GitHub issue is resolved.
// See: https://github.com/storybookjs/storybook/issues/7829
ignoreDiagnostics: [7005],
configFile: path.resolve(__dirname, 'tsconfig.storybook.json')
}
}
Expand Down

0 comments on commit 939a701

Please sign in to comment.