1.0.1 • Published 4 years ago

craco-styled-jsx v1.0.1

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

craco-styled-jsx

This is a craco plugin that adds styled-jsx support to create-react-app version >= 2

Installation

First, follow the craco Installation Instructions to install the craco package, create a craco.config.js file.

Then install craco-styled-jsx:

$ yarn add craco-styled-jsx

# OR

$ npm i -S craco-styled-jsx

Usage

Here is a complete craco.config.js configuration file that adds styled-jsx to create-react-app:

module.exports = {
  plugins: [
    {
      plugin: require('craco-styled-jsx'),
      options: {
        sass: true, // Required node-sass to enable this option
        cssFileSupport: true, // Allow to write css in a standalone file
        cssFileTest: /\.styled\.(s)css$/,
      }
    },
  ],
}