Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-plugin-sass): Support Dart SASS #10159

Merged
merged 4 commits into from
Dec 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions packages/gatsby-plugin-sass/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,33 @@ Provides drop-in support for SASS/SCSS stylesheets

## How to use

1. Include the plugin in your `gatsby-config.js` file.
2. Write your stylesheets in SASS/SCSS and require or import them as normal.
1. Include the plugin in your `gatsby-config.js` file.
2. Write your stylesheets in SASS/SCSS and require or import them as normal.

```javascript
// in gatsby-config.js
plugins: [`gatsby-plugin-sass`]
```

If you need to pass options to Sass use the plugins options, see [node-sass](https://github.com/sass/node-sass)
By Default `node-sass` is used. To use `dart-sass`.

```bash
npm i -D sass
```

```javascript
// in gatsby-config.js
plugins: [
{
resolve: `gatsby-plugin-sass`,
options: {
implementation: require("sass"),
},
},
]
```

If you need to pass options to Sass use the plugins options, see [node-sass](https://github.com/sass/node-sass)/[dart-sass](https://github.com/sass/dart-sass) docs
for all available options.

```javascript
Expand All @@ -26,6 +44,7 @@ plugins: [
resolve: `gatsby-plugin-sass`,
options: {
includePaths: ["absolute/path/a", "absolute/path/b"],
...
},
},
]
Expand Down