css-purify-webpack-loader

1.0.1 • Public • Published

css-purify-webpack-loader

css-purify-webpack-loader is a webpack loader that take css an purify it, it is usefull in some senarios.

Usage

npm i --D css-purify-webpack-loader
rules=[
        {
          ...
          use: [
            ...
            {
              loader: 'css-purify-webpack-loader',
              options: {
                includes: [
                  './pages/*.js',
                  './components/**/*.js',
                  './containers/**/*.js'
                ],
              },
            }
            ...
          ],
        }
    ]

css-purify-webpack-loader uses purify-css,

Options:

includes:

Specify the files to include in the purify process and must obey the glob file pattern, this option is necessary.

purifyCssOptions:

If you want to pass options to the purify-css then use this, the default is : { minify: true, info: true, }

when:

Is a boolean that specify when to run the purification, the default is process.env.NODE_ENV === 'production'

Package Sidebar

Install

npm i css-purify-webpack-loader

Weekly Downloads

74

Version

1.0.1

License

MIT

Unpacked Size

2.87 kB

Total Files

3

Last publish

Collaborators

  • omar_bouzoumita