Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
autoprefixer-loader
Advanced tools
Readme
An autoprefixer loader for webpack.
:warning: This module is deprecated. Autoprefixer official page recommends using
postcss-loader
instead.
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.
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',
...
}]
npm install autoprefixer-loader --save-dev
In lieu of a formal styleguide, take care to maintain the existing coding style.
add
, remove
options, bump autoprefixer-coreLicensed under the MIT license.
FAQs
[deprecated] Autoprefixer loader for webpack
The npm package autoprefixer-loader receives a total of 8,156 weekly downloads. As such, autoprefixer-loader popularity was classified as popular.
We found that autoprefixer-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.