fabien0102/gatsby-starter

Consider adding typescript-css-modules plugin

jcreamer898 opened this issue ยท 4 comments

First of all, love this starter! I have been playing with it for a few days and it works great.

We're using CSS modules and typescript on my team, and I created a plugin for allowing such a thing to work.

https://github.com/jcreamer898/gatsby-plugin-typescript-css-modules

If you would like to, you could add it to your gatsby-config.js in here.

I can do a PR for it if you wanna do it, otherwise, just an FYI that such a thing now exists. :)

Hello @jcreamer898,
Thank you for your feedback, it's always a pleasure to know that people use/like this starter ๐Ÿ˜ƒ

I personnally prefer css in js, but very nice for your gatsby plugin, it's always good to have the choice ๐Ÿ˜‰

I also prefer keep this starter simple, it's just a starter and it's really easy to add some plugin to gatsby if you want others features ^^

BTW, if you have a great site based on this starter, we can maybe add this one as an example (#42 ) ๐Ÿ˜‰

Happy new year!

Well, just as an FYI, the Gatsby already supports CSS Modules out of the box...

https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/webpack.config.js#L415

All that my plugin does is make sure that it works with TypeScript.

I could do an example for you potentially as well.

Thanks for making such a good starter. It really helped me grok Gatbsy!

mmm, good to know, so why not for a quick PR ๐Ÿ˜‰ so anyone can easily use css (and it's optionnal, so good for me ;) )

Will do!