VulcanJS / vulcan-next

The Next starter for GraphQL developers
http://vulcan-docs.vercel.app
MIT License
393 stars 29 forks source link

CSS modules in storybook #20

Closed eric-burel closed 3 years ago

eric-burel commented 4 years ago

See relevant issue in Storybook: https://github.com/storybookjs/storybook/issues/9610#issuecomment-641290144

Tracking branch: https://github.com/VulcanJS/vulcan-next-starter/tree/bugfix/css-modules-storybook

Main Next+TS+storybook issue: https://github.com/storybookjs/storybook/issues/9610

CSS modules imports are not correctly loaded in stories, they get an empty object. However, surprisingly, styled-jsx worked out-of-the box with new Storybook zero-config TS support.

Steps to solve

Issue can be seen in Storybook.

eric-burel commented 3 years ago

Solved already, by using ""storybook-css-modules-preset"