Skip to content

A craco plugin to use Linaria zero-runtime CSS in JS library in a create react app.

License

Notifications You must be signed in to change notification settings

radicalcondor/craco-linaria

 
 

Repository files navigation

craco-linaria

Travis Build Status codecov code style: prettier

A craco plugin to use Linaria zero-runtime CSS in JS library in a create react app.

Installation

First, follow craco's installation instructions.

Then, install craco-linaria and Linaria:

$ yarn add -D craco-linaria @linaria/core @linaria/babel-preset @linaria/webpack-loader

// or

$ npm install --save-dev craco-linaria @linaria/core @linaria/babel-preset @linaria/webpack-loader

Usage

/* craco.config.js */
const CracoLinariaPlugin = require('craco-linaria')

module.exports = {
  plugins: [
    {
      plugin: CracoLinariaPlugin,
      options: {
        // Linaria options
      },
    },
  ],
}

You can specify Linaria options inline (as above) or it will be picked up from any of the supported configuration paths.

Git Ignore

This plugin stores Linaria cache in src/.linaria_cache, so you might want to add that path to your .gitignore file.

About

A craco plugin to use Linaria zero-runtime CSS in JS library in a create react app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%