Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autoprefixer-loader

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoprefixer-loader

Autoprefixer loader for webpack

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by62.44%
Maintainers
2
Weekly downloads
 
Created
Source

autoprefixer-loader Build Status Dependency Status Code Climate

An autoprefixer loader for webpack.

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 version'
  }]
}

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',
  ...
}]

Install

npm install autoprefixer-loader --save-dev

Contributing

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

Release History

  • 1.2.0 - Added support for existing sourcemaps from earlier in the chain
  • 0.1.0 - Initial release

License

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 01 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc