postcss-avoid-purge

1.0.1 • Public • Published

PostCSS Avoid Purge

PostCSS plugin that marks the stylesheet as purged and can no longer be purged further.

.foo {
    /* Input example */
}
/* ! purgecss start ignore */
.foo {
  /* Output example */
}
/* ! purgecss end ignore */

Usage

Step 1: Install plugin:

npm install --save-dev postcss postcss-avoid-purge

Step 2: Check you project for existed PostCSS config: postcss.config.js in the project root, "postcss" section in package.json or postcss in bundle config.

If you do not use PostCSS, add it according to official docs and set this plugin in settings.

Step 3: Add the plugin to plugins list:

module.exports = {
  plugins: [
    require('@fullhuman/postcss-purgecss'),
+   require('postcss-avoid-purge'),
    require('autoprefixer')
  ]
}

Make sure that the plugin is placed right after the postcss-purgecss library.

Package Sidebar

Install

npm i postcss-avoid-purge

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

9.61 kB

Total Files

7

Last publish

Collaborators

  • picapixa