Configuration Library
Examples of how you can configure Postcss with your Ember app.
As a Postprocessor Only
A common use case for this addon is that your project is already setup with Sass, Less or something custom, but you want to take advantage of the transformations Postcss can offer at the end of your application's build process. Using the filter mode will run postcss on all of your styles, including vendor, allowing you to make more general transformations.
This example configuration doesn't run Postcss on Bootstrap files, but applies a number of transformations on the styles and then logs a useful overview of some stats.
// ember-cli-build.js
module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
postcssOptions: {
compile: {
enabled: false,
},
filter: {
enabled: true,
exclude: ['vendor/bootstrap/**/*'],
plugins: [
{ module: require('postcss-fixes') },
{ module: require('postcss-momentum-scrolling') },
{ module: require('autoprefixer') },
{ module: require('cssstats') },
{ module: require('postcss-stats-reporter') }
]
}
}
})
}