DEV Community

Discussion on: Next.js ▲ + Typescript + Storybook The Really Simple Guide 2019

Collapse
 
iotheo profile image
John Theodorakopoulos

I would like to thank you for the tutorial. It's pretty neat and straight forward.

I'd like to ask, what's the intent of the test rule against ts/tsx files in the webpack.config of storybook?

Collapse
 
markohologram profile image
Marko A

I guess it modifies the default Storybook Webpack configuration in order to allow Storybook to resolve/load TS/TSX files. Project probably doesn't work without it and would probably throw you an error saying it cannot resolve files that you try to import into stories and maybe even throw errors that it cannot resolve the stories files themselves (if you write them in .tsx files as the example in this article does)