1.0.3 • Published 4 years ago

@hisystems/snowpack-plugin-postcss v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@hisystems/snowpack-plugin-postcss

Run PostCSS on all .css files, including ones generated from Sass, Vue, and Svelte.

Usage

From a terminal, run the following:

npm install --save-dev @hisystems/snowpack-plugin-postcss postcss postcss-cli

Then add this plugin to your Snowpack config:

// snowpack.config.json
{
  "plugins": [
    "@hisystems/snowpack-plugin-postcss"
  ]
}

Lastly, add a postcss.config.js file to the root of your project as you would normally:

const cssnano = require('cssnano');
const postcssPresetEnv = require('postcss-preset-env');

module.exports = {
  plugins: [cssnano(), postcssPresetEnv()],
};

Plugin Options

NameTypeDescription
inputstring[]File extensions to transform (default: ['.css'])
configstring(optional) Set a custom path to your PostCSS config (in case PostCSS has trouble loading it automatically, or in case you want multiple PostCSS setups)