PostCSS

PostCSS plugin for magefront.

Install

Install the plugin and its dependencies:

npm i postcss magefront-plugin-postcss --save-dev

Usage

import postcss from 'magefront-plugin-postcss'

export default {
    plugins: [
        postcss()
    ]
}

Options

src

The CSS files to process. Default is **/!(_)*.css.

ignore

A list of paths to ignore.

plugins

A list of PostCSS plugins to use. See PostCSS plugins repository for more info.

Example

The following example uses Autoprefixer to add vendor prefixes to CSS rules.

// magefront.config.js
import postcss from 'magefront-plugin-postcss'
import autoprefixer from 'autoprefixer'

export default {
    plugins: [
        postcss({
            plugins: [
                autoprefixer()
            ]
        })
    ]
}

© 2024 Magefront and its contributors.
Licensed under MIT.