styled-jsx-postcss
Babel transform to run PostCSS on styled-jsx
Last updated 8 years ago by giuseppegurgone .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install styled-jsx-postcss 
SYNC missed versions from official npm registry.

styled-jsx-postcss

Build Status npm

Use PostCSS with styled-jsx 💥

Usage

Install the package first.

npm install --save styled-jsx-postcss

Next, add styled-jsx-postcss/babel to plugins in your babel configuration:

{
  "plugins": [
    "styled-jsx-postcss/babel"
  ]
}

Notes

styled-jsx-postcss extends styled-jsx therefore you don't need to include both – just add styled-jsx-postcss and you're ready to rock!

Also keep in mind that the PostCSS transformations run on styled-jsx transformed code.

If you're already using styled-jsx and don't want to rename all the import and/or require you can define an alias with webpack (and other module bundlers I believe) like so:

module.exports = {
  resolve: {
    alias: {
      'styled-jsx': '@giuseppeg/styled-jsx-postcss'
    }
  },
  // ...
}

Plugins

styled-jsx-postcss uses postcss-load-plugins therefore you may want to refer to their docs to learn more about adding plugins

styled-jsx api

styled-jsx-postcss exports all of the modules from styled-jsx.

This mean that you can include styled-jsx-postcss/server or styled-jsx-postcss/style like you would do with Zeit's styled-jsx!

Read the styled-jsx docs.

Credits

<3 goes to

Current Tags

  • 0.2.0                                ...           latest (8 years ago)

7 Versions

  • 0.2.0                                ...           8 years ago
  • 0.1.5                                ...           8 years ago
  • 0.1.4                                ...           8 years ago
  • 0.1.3                                ...           8 years ago
  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)

© 2010 - cnpmjs.org x YWFE | Home | YWFE