Skip to content

Commit

Permalink
feat: type-check stories during Storybook build (#876)
Browse files Browse the repository at this point in the history
- add `check: true` to Storybook TS config
  - which runs `fork-ts-checker-webpack-plugin` to check types
     asynchronously in a separate process during Storybook build

Co-authored-by: Anton Gilgur <agilgur5@gmail.com>
  • Loading branch information
kylemh and agilgur5 authored Sep 21, 2020
1 parent 427e5ad commit f1ddccb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/react-with-storybook/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
typescript: {
check: true, // type-check stories during Storybook build
}
};

1 comment on commit f1ddccb

@vercel
Copy link

@vercel vercel bot commented on f1ddccb Sep 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.