@snowpack/plugin-postcss

1.4.3 • Public • Published

@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 @snowpack/plugin-postcss postcss

Then add this plugin to your Snowpack config:

// snowpack.config.mjs
export default {
  plugins: ['@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

Name Type Description
input string[] File extensions to transform (default: ['.css'])
config string | object (optional) Pass in a PostCSS config object or path to your PostCSS config on disk

Readme

Keywords

none

Package Sidebar

Install

npm i @snowpack/plugin-postcss

Weekly Downloads

558

Version

1.4.3

License

MIT

Unpacked Size

12.4 kB

Total Files

12

Last publish

Collaborators

  • fredkschott
  • drewpowers