fabien0102 / gatsby-starter

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

Using SASS/SCSS? #60

Closed mcblum closed 5 years ago

mcblum commented 6 years ago

Hey! Thank you for putting this together. I've added the gatsby-plugin-sass and changed the main styles.css to styles.scss and tried to import it, but I'm getting the following error:

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                                                         
This relative module was not found:
* ../css/styles.scss in ./src/layouts/index.tsx

Anyone have any experience combining this starter with SCSS?

Thank you!

fabien0102 commented 6 years ago

Hello @mcblum :) This starter was not really designed for scss and I never tried (I really enjoyed the css in js 😅 ) BUT, you can try to add a styles.d.ts to permit to typescript to understand your scss.

You can find a working example here of a TS project with scss (an old project ^^) I hope that it can save you 😄

fabien0102 commented 5 years ago

Old issue and part of the "design goal" of this starter :wink: