Skip to content

Commit

Permalink
migration docs to css loader v1 (#25575)
Browse files Browse the repository at this point in the history
* migration docs to css loader v1

* Update css-loader link to v1 in gatsby-plugin-sass

* Update css-loader link to v1 in gatsby-plugin-less

* Update css-loader link to v1 in gatsby-plugin-postcss

* Specifically note css-loader version in gatsby-plugin-sass

* Specifically note css-loader version in gatsby-plugin-postcss

* Specifically note css-loader version in gatsby-plugin-less

* chore: format

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
graysonhicks and gatsbybot committed Jul 9, 2020
1 parent 685cc05 commit 538f482
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/docs/migrating-from-v1-to-v2.md
Expand Up @@ -676,7 +676,7 @@ If you use [`gatsby-plugin-typography`](/packages/gatsby-plugin-typography/), yo

If you use CSS Modules and have class names with dashes in them, you'll need to change how you access the class names from JavaScript.
This is because the [`camelCase` option](https://github.com/webpack-contrib/css-loader#camelcase) for CSS Modules has been changed from `false` to `dashesOnly`.
This is because the [`camelCase` option](https://github.com/webpack-contrib/css-loader/tree/version-1#camelcase) for CSS Modules has been changed from `false` to `dashesOnly`.
Here's an example with a class named `.my-class-name`:

Expand All @@ -692,7 +692,7 @@ export default function Component({ children }) (
)
```

The Gatsby v1 behavior can be restored by adjusting [CSS Loader options](https://github.com/webpack-contrib/css-loader#options).
The Gatsby v1 behavior can be restored by adjusting [CSS Loader options](https://github.com/webpack-contrib/css-loader/tree/version-1#options).

For vanilla CSS without a preprocessor:

Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-less/README.md
Expand Up @@ -37,7 +37,8 @@ plugins: [
]
```

If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader)
If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader/tree/version-1)
**Note:** Gatsby is using `css-loader@1.0.1`.

```javascript
// in gatsby-config.js
Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-postcss/README.md
Expand Up @@ -54,7 +54,8 @@ module.exports = () => ({
})
```

If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader)
If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader/tree/version-1)
**Note:** Gatsby is using `css-loader@1.0.1`.

```javascript
// in gatsby-config.js
Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-sass/README.md
Expand Up @@ -46,7 +46,8 @@ plugins: [
]
```

If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader):
If you need to override the default options passed into [`css-loader`](https://github.com/webpack-contrib/css-loader/tree/version-1):
**Note:** Gatsby is using `css-loader@1.0.1`.

```javascript:title=gatsby-config.js
plugins: [
Expand Down

0 comments on commit 538f482

Please sign in to comment.