Skip to content

omar-bz/css-purify-webpack-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published