gatsby-plugin-styled-jsx-postcss
v2.0.2
Published
A Gatsby plugin to use styled-jsx with PostCSS
Downloads
203
Readme
gatsby-plugin-styled-jsx-postcss
A Gatsby plugin to use styled-jsx with PostCSS.
Install
With Yarn:
yarn add gatsby-plugin-styled-jsx-postcss
Or with npm:
npm install --save gatsby-plugin-styled-jsx-postcss
Usage
// In your gatsby-config.js
plugins: [
'gatsby-plugin-styled-jsx-postcss',
]
Options
This plugin will also watch CSS files and refresh your browser on change if running in develop
mode. This is because if you're importing other CSS files in your <style>
tags, the browser will not refresh on its own. To disable this set a watchCss
option to false
.
Adding PostCSS plugins
This plugin uses the postcss-load-plugins, so you can import PostCSS plugins with any of the methods mentioned in their documentation.