A small plugin for @11ty/eventy that enables the support for PostCSS pre-processor in you eleventy project.
@11ty/eleventy@^1.0.0
- 😌 Simple. Easy to install, requires minimum configuration.
- ⭐️ Modern. Compatible with the most recent major eleventy version.
- 🗂 Flexible. Supports the following file extensions:
.css
,.postcss
,.pcss
. - ⚙️ Configurable. Supports PostCSS configuration via
.postcssrc
file. (more info)
- Install:
npm install --save-dev eleventy-plugin-postcss
- Add the following lines to the
.eleventy.js
:
// Import the plugin
const PostCSSPlugin = require("eleventy-plugin-postcss");
module.exports = (config) => {
// Enable the plugin in you project
config.addPlugin(PostCSSPlugin);
}
- (Optional) Create a
.postcssrc.{json,yml,...}
config file for additional configuration. (more info).
To load and resolve the configuration file the plugin uses postcss-load-config
module. Check out the project readme for the complete list of supported config file formats.
Feel free to open a Github issue for suggestions, bug reports, feature requests.