fabien0102 / gatsby-starter

Gatsby 2.0 starter with typescript and many cools dev tools
386 stars 99 forks source link

Consider adding typescript-css-modules plugin #44

Open jcreamer898 opened 6 years ago

jcreamer898 commented 6 years ago

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. :)

fabien0102 commented 6 years ago

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 ) :wink:

Happy new year!

jcreamer898 commented 6 years ago

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!

fabien0102 commented 6 years ago

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

jcreamer898 commented 6 years ago

Will do!