Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.0 to 1.1.0

6

CHANGELOG.md

@@ -0,1 +1,5 @@

## 1.1
* PostCSS common config could be placed to subdirs.
* Add webpack instance to PostCSS common config context.
## 1.0

@@ -5,3 +9,3 @@ * Add common PostCSS config support (by Mateusz Derks).

* Add `dependency` message support.
* Rewite docs (by Michael Ciniawsky).
* Rewrite docs (by Michael Ciniawsky).

@@ -8,0 +12,0 @@ ## 0.13

3

index.js

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

var assign = require('object-assign');
var path = require('path');

@@ -60,3 +61,3 @@ var PostCSSLoaderError = require('./error');

}
return loadConfig(pack);
return loadConfig({ webpack: loader }, path.dirname(file));
}

@@ -63,0 +64,0 @@ }).then(function (config) {

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

@@ -10,6 +10,6 @@ "keywords": ["webpack", "loader", "css", "postcss", "postcss-runner"],

"dependencies": {
"postcss-load-config": "^1.0.0-rc",
"postcss-load-config": "^1.0.0",
"object-assign": "^4.1.0",
"loader-utils": "^0.2.16",
"postcss": "^5.2.4"
"postcss": "^5.2.5"
},

@@ -16,0 +16,0 @@ "devDependencies": {

@@ -42,4 +42,4 @@ # PostCSS for Webpack [![Build Status][ci-img]][ci]

{
test: /\.css$/,
loader: [
test: /\.css$/,
loaders: [
'style-loader',

@@ -60,4 +60,5 @@ 'css-loader?importLoaders=1',

plugins: [
require('precss'),
require('autoprefixer')
require('postcss-smart-import')({ /* ...options */ }),
require('precss')({ /* ...options */ }),
require('autoprefixer')({ /* ...options */ })
]

@@ -94,4 +95,5 @@ }

return [
require('precss'),
require('autoprefixer')
require('postcss-smart-import')({ /* ...options */ }),
require('precss')({ /* ...options */ }),
require('autoprefixer')({ /* ...options */ })
];

@@ -116,3 +118,3 @@ }

test: /\.css$/,
loader: [
loaders: [
'style-loader',

@@ -127,4 +129,5 @@ 'css-loader?importLoaders=1',

return [
require('precss'),
require('autoprefixer')
require('postcss-smart-import')({ /* ...options */ }),
require('precss')({ /* ...options */ }),
require('autoprefixer')({ /* ...options */ })
];

@@ -152,3 +155,3 @@ }

test: /\.sss/,
loader: [
loaders: [
'style-loader',

@@ -177,3 +180,3 @@ 'css-loader?importLoaders=1',

test: '\/.css',
loader: [
loaders: [
'style-loader',

@@ -201,3 +204,3 @@ 'css-loader?importLoaders=1',

test: /\.css$/,
loader: [
loaders: [
'style-loader',

@@ -227,3 +230,3 @@ 'css-loader?modules&importLoaders=1',

test: /\.style.js$/,
loader: [
loaders: [
'style-loader',

@@ -260,3 +263,3 @@ 'css-loader?modules&importLoaders=1',

test: /\.style.xyz$/,
loader: [
loaders: [
'style-loader',

@@ -272,2 +275,17 @@ 'css-loader?modules&importLoaders=1',

### Dymaic Config
PostCSS loader sends a loaded instance to PostCSS common config.
You can use it to do some real magic:
```js
module.exports = function (ctx) {
if (check(ctx.webpack.resourcePath)) {
return plugins1;
} else {
return plugins2;
}
}
```
### Webpack Events

@@ -284,2 +302,2 @@

[example]: https://github.com/postcss/postcss-loader/blob/master/test/support/webpack-plugins/rewrite.js
[example]: https://github.com/postcss/postcss-loader/blob/master/test/webpack-plugins/rewrite.js
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