Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 49ae6a1

Browse files
author
Jesper Orb
authored
chore: add css preprocessor info to migration
1 parent 00d3aa5 commit 49ae6a1

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

src/docs/documentation/references/migration-guide.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,28 @@ export default ({ children }) => (
8888
</div>
8989
)
9090
```
91+
92+
## CSS preprocessors managed by gatsby
93+
94+
CSS preprocessors and modules were handled by [`docz-plugin-css`](https://github.com/doczjs/docz-plugin-css) which hooked into the bundler config to add different loader support via webpack.
95+
96+
With the change to gatsby preprocessors like `sass` can be handled by gatby via [Plugins](https://www.gatsbyjs.org/plugins/)
97+
98+
These plugins are added by adding a `gatsby-config.js` in your project root or modifying an existing one. For example if you want to add support for `sass` you would do the following:
99+
100+
1. Install [`node-sass`](https://github.com/sass/node-sass) and [`gatsby-plugin-sass`](https://www.gatsbyjs.org/packages/gatsby-plugin-sass/)
101+
```bash
102+
# npm
103+
npm install --save node-sass gatsby-plugin-sass
104+
105+
# yarn
106+
yarn add node-sass gatsby-plugin-sass
107+
```
108+
109+
2. Add the plugin to your `gatsby-config.js`
110+
```js
111+
//gatsby-config.js
112+
module.exports = {
113+
plugins: ['gatsby-plugin-sass']
114+
}
115+
```

0 commit comments

Comments
 (0)