craco-styled-jsx

1.0.1 • Public • Published

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$/,
      }
    },
  ],
}

Package Sidebar

Install

npm i craco-styled-jsx

Weekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • vqt907