autoprefixer-loader

Autoprefixer loader for webpack

Please use postcss-loader instead of autoprefixer-loader
Last updated 9 years ago by passy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install autoprefixer-loader 
SYNC missed versions from official npm registry.

autoprefixer-loader Build Status Dependency Status Code Climate

An autoprefixer loader for webpack.

:warning: This module is deprecated. Autoprefixer official page recommends using postcss-loader instead.

Usage

var css = require('!raw!autoprefixer!./file.css'); // Just the CSS
var css = require('!css!autoprefixer!./file.css'); // CSS with processed url(...)s

See css-loader to see the effect of processed url(...)s.

Or within the webpack config:

module: {
  loaders: [{
    test: /\.css$/,
    loader: 'css-loader!autoprefixer-loader?browsers=last 2 versions'
  }]
}

Then you can: var css = require('./file.css');.

Use in tandem with the style-loader to add the css rules to your document:

module: {
  loaders: [{
    test: /\.css/,
    loader: 'style-loader!css-loader!autoprefixer-loader'
  }]
}

and then require('./file.css'); will compile and add the CSS to your page.

Options

browsers

Specify a single browser to support. Read more

loaders: [{
  loader: 'css-loader!autoprefixer-loader?browsers=last 2 version',
  ...
}]

For a list of browsers use JSON syntax.

loaders: [{
  loader: 'css-loader!autoprefixer-loader?{browsers:["last 2 version", "Firefox 15"]}',
  ...
}]

cascade

Default: true

When disabled, autoprefixer creates no visual cascade for the generated prefixes. Read more

loaders: [{
  loader: 'css-loader!autoprefixer-loader?cascade=false',
  ...
}]

safe

Default: false

When enabled, autoprefixer will attempt to parse invalid CSS. Read more

loaders: [{
  loader: 'css-loader!autoprefixer-loader?safe=true',
  ...
}]

add

Default: true

While disabled, autoprefixer will not add any new prefixes to your code. Read more

loaders: [{
  loader: 'css-loader!autoprefixer-loader?add=false',
  ...
}]

remove

Default: true

Whether or not autoprefixer should automatically remove outdated prefixes. Read more

loaders: [{
  loader: 'css-loader!autoprefixer-loader?remove=false',
  ...
}]

Install

npm install autoprefixer-loader --save-dev

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

Release History

  • 3.1.0 - Upgrade dependencies, move to autoprefixer (no longer -core)
  • 3.0.0 - Upgrade to autoprefixer-core 6.0
  • 2.1.0 - Add add, remove options, bump autoprefixer-core
  • 2.0.0 - Updated autoprefixer + postcss
  • 1.2.0 - Added support for existing sourcemaps from earlier in the chain
  • 0.1.0 - Initial release

License

Licensed under the MIT license.

Current Tags

  • 3.2.0                                ...           latest (9 years ago)

11 Versions

  • 3.2.0 [deprecated]           ...           9 years ago
  • 3.1.0 [deprecated]           ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           10 years ago
  • 2.0.0-beta.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (8)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |