node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

neutrino-middleware-postcss

Neutrino PostCSS middleware

Greenkeeper badge NPM version NPM downloads Join Slack

neutrino-middleware-postcss is a Neutrino middleware that adds support for PostCSS plugins.

Documentation

Install this middleware to your development dependencies, then set it up in .neutrinorc.js just like you would with regular postcss-loader:

  const autoprefixer = require('autoprefixer');
 
  module.exports = {
    use: [
      "neutrino-preset-web",
      ["neutrino-middleware-postcss", {
        plugins: [
          autoprefixer()
        ]
      }]
    ],
    ...
  };

cssnext

neutrino-preset-postcss-cssnext is on hold until cssnext supports PostCSS 6.x.

Using with ExtractTextPlugin

The neutrino-middleware-extractstyles package resets the style configuration. An alternative approach would be to let the middleware re-use the style rule loaders. There's an alternative middleware available in a gist.