You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gatsby-plugin-styletron): update to v5, debug mode, useStyletron (#13955)
* feat(gatsby-plugin-styletron): update to v5, debug mode, useStyletron hook
BREAKING CHANGE: styletron.css() removed, useStyletron as a native replacement
* feat(gatsby-plugin-styletron): debug mode can be disabled through the config
* feat(gatsby-plugin-styletron): add note about styletron-react v5 support
A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for
4
-
[styletron](https://github.com/rtsao/styletron) with built-in server-side
4
+
[styletron](https://github.com/styletron/styletron) with built-in server-side
5
5
rendering support.
6
6
7
+
**This plugin supports `styletron-react` v5.** Check [the release notes](https://github.com/styletron/styletron/releases/tag/styletron-react%405.0.0) for more details about v5.
8
+
7
9
## Install
8
10
9
-
`npm install --dev gatsby-plugin-styletron`
11
+
```sh
12
+
npm install gatsby-plugin-styletron
13
+
```
10
14
11
15
## How to use
12
16
@@ -16,98 +20,41 @@ Edit `gatsby-config.js`
16
20
module.exports= {
17
21
plugins: [
18
22
{
19
-
resolve:"gatsby-plugin-styletron",
23
+
resolve:`gatsby-plugin-styletron`,
20
24
options: {
21
25
// You can pass options to Styletron.
22
26
prefix:"_",
27
+
// Disable dev debug mode, enabled by default
28
+
debug:false,
23
29
},
24
30
},
25
31
],
26
32
}
27
33
```
28
34
29
-
This can be used as described by [styletron-react](https://github.com/rtsao/styletron/tree/master/packages/styletron-react) such as:
0 commit comments