1.2.2 • Published 8 months ago

craco-style-resources-loader v1.2.2

Weekly downloads
131
License
MIT
Repository
github
Last release
8 months ago

Craco style-resources-loader

MIT License

This is a craco plugin to add style-resources-loader with create-react-app version >= 2.

Inspired by: https://github.com/tilap/craco-sass-resources-loader

Installation

$ yarn add -D craco-style-resources-loader

# OR

$ npm install craco-style-resources-loader --save-dev

Usage

craco-style-resources-loader expect a patterns option containing a string or an array of string pointing the CSS files your want to load before any CSS/styles file.

const stylesResourcesLoader = require('craco-style-resources-loader');

module.exports = {
  plugins: [
    {
      plugin: stylesResourcesLoader,
      options: {
        patterns: './src/variables.css',
      },
    },
  ],
}

You can load multiple CSS files too:

const stylesResourcesLoader = require('craco-style-resources-loader');

module.exports = {
  plugins: [
    {
      plugin: stylesResourcesLoader,
      options: {
        patterns: [
          './src/global-variables.css',
          './src/theme-variables.css'
        ],
      },
    },
  ],
}
1.2.0

8 months ago

1.2.2

8 months ago

1.1.1

2 years ago

1.1.2

2 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago