PostCSS configuration

You may use custom PostCSS plugins in Maizzle.

Plugins

Here's how you can add PostCSS plugins - we'll use Autoprefixer.

First, install the plugin:

npm install autoprefixer

Then register it in config.js:

config.js
import autoprefixer from 'autoprefixer'
export default {
build: {
postcss: {
plugins: [
autoprefixer,
]
}
}
}

Any plugins that you register in the plugins array will be added at the end of the PostCSS plugins stack, which means they'll run after Tailwind CSS.

Options

You may also configure PostCSS options:

config.js
export default {
build: {
postcss: {
options: {
map: true,
}
}
}
}
Copyright © 2024 Maizzle SRLBrand policy
Edit this page on GitHub