Nutritious Pomegranate Muffins

    craco-style-resources-loader

    1.1.2 • Public • Published

    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'
            ],
          },
        },
      ],
    }

    Install

    npm i craco-style-resources-loader

    DownloadsWeekly Downloads

    41

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    5.24 kB

    Total Files

    6

    Last publish

    Collaborators

    • spacedawwwg