Setting Up SASS in Gatsby

Started working on Gatsby, and using SASS for styling the layout.

😇

You can do the SASS setup in few steps:

  1. Install Plugins & Packages

    $ npm install --save node-sass gatsby-plugin-sass
  2. Create gatsby configuration file in root path

    gatsby-config.js:
    module.exports = {
    plugins: ['gatsby-plugin-sass']
    }

    After adding above file with snippet, Gatsby knows how to use SASS.

  3. Create SASS file as filename.scss

  4. Import it into the JS file


That's it. Work is done, now you can write css in sass.I hope you love the article. If you have any question, please feel free to ping me on @suprabhasupi 😋