🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

postcss-loader

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-loader - npm Package Compare versions

Comparing version

to
1.1.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 1.1.1
* Fix `this` in options function (by Jeff Escalante).
## 1.1

@@ -2,0 +5,0 @@ * PostCSS common config could be placed to subdirs.

2

index.js

@@ -54,3 +54,3 @@ var loaderUtils = require('loader-utils');

if ( typeof options !== 'undefined' ) {
return parseOptions(options, pack);
return parseOptions.call(loader, options, pack);
} else {

@@ -57,0 +57,0 @@ if ( pack ) {

{
"name": "postcss-loader",
"version": "1.1.0",
"version": "1.1.1",
"description": "PostCSS loader for webpack",

@@ -24,3 +24,3 @@ "keywords": ["webpack", "loader", "css", "postcss", "postcss-runner"],

"gulp-mocha": "3.0.1",
"fs-extra": "0.30.0",
"fs-extra": "1.0.0",
"sugarss": "0.2.0",

@@ -27,0 +27,0 @@ "chai": "3.5.0",

@@ -28,11 +28,5 @@ # PostCSS for Webpack [![Build Status][ci-img]][ci]

You can configure PostCSS Loader in common PostCSS config or directly
in Webpack config. Common PostCSS config is recommended way, because
many PostCSS tools will be able to share it.
Add PostCSS Loader to `webpack.config.js`. Put it after `css-loader`
and `style-loader`. But before `sass-loader`, if you use it.
### PostCSS Config
Add PostCSS Loader to `webpack.config.js`. Put it before `css-loader`
and `style-loader`. But after `sass-loader`, if you use it.
```js

@@ -75,61 +69,2 @@ module.exports = {

### Webpack 2.x Config
```js
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: { importLoaders: 1 }
},
{
loader: 'postcss-loader',
options: {
plugins: function () {
return [
require('postcss-smart-import')({ /* ...options */ }),
require('precss')({ /* ...options */ }),
require('autoprefixer')({ /* ...options */ })
];
}
}
}
]
}
]
}
}
```
### Webpack 1.x Config
```js
module.exports = {
module: {
loaders: [
{
test: /\.css$/,
loaders: [
'style-loader',
'css-loader?importLoaders=1',
'postcss-loader'
]
}
]
},
postcss: function () {
return [
require('postcss-smart-import')({ /* ...options */ }),
require('precss')({ /* ...options */ }),
require('autoprefixer')({ /* ...options */ })
];
}
}
```
## Options

@@ -267,3 +202,3 @@

### Dymaic Config
### Dynamic Config

@@ -270,0 +205,0 @@ PostCSS loader sends a loaded instance to PostCSS common config.