Adds SSR support for styled-jsx
npm install gatsby-plugin-styled-jsxProvides drop-in support for styled-jsx.
npm install styled-jsx gatsby-plugin-styled-jsx
Add the plugin to the plugins array in your gatsby-config.js and use tags in your component files.
``javascriptgatsby-plugin-styled-jsx
plugins: []`
You can add styled-jsx plugins with the jsxPlugins option
`jsgatsby-plugin-styled-jsx
plugins: [
{
resolve: ,`
options: {
jsxPlugins: ["styled-jsx-plugin-postcss"],
},
},
]
Configuration options for styled-jsx can also be specified:
`jsgatsby-plugin-styled-jsx
plugins: [
{
resolve: ,``
options: {
optimizeForSpeed: true,
sourceMaps: false,
vendorPrefixes: true,
},
},
]