# DEPRECATED. Use postcss-loader instead.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

DEPRECATED. Use postcss-loader instead.


cssnext-loader Build Status

a webpack loader for cssnext

Issues with the output should be reported on cssnext issue tracker.

Install

$ npm install cssnext-loader

Usage

Add a cssnext section in your webpack.config.js

module.exports = {
  entry: "path/to/entry",
  output: {
    path: "path/to/output/",
    filename: "bundle.js"
  },
  cssnext: {
    browsers: "last 2 versions",
  }
}

You can configure webpack so that it always parses CSS files like this :

module: {
  loaders: [
    {
      test:   /\.css$/,
      loader: "style-loader!css-loader!cssnext-loader"
    }
  ]
}

Or, for a direct usage, in your JavaScript files :

var css = require("style-loader!css-loader!cssnext-loader!../..!./file.css")

Options

Options are directly passed to cssnext, so checkout cssnext options directly.

Note: some options are by default automatically specified.

  • from
  • to
  • sourcemap (webpack sourceMap)
  • compress (webpack minimize)

Changelog

License