From 071e24a6816b3cafe5118b9b957e1de028282fb8 Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Thu, 6 Oct 2016 20:58:12 -0700 Subject: [PATCH 1/2] Allow `options` via `query`. When `webpack@2` lands there will no longer be any `this.options`. Since query can now be a vanilla object instead of a string, having `options` reside in query is a quick, non-destructive fix. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f8ca2481..f019cc90 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ module.exports = function (source, map) { if ( typeof map === 'string' ) map = JSON.parse(map); if ( map && map.mappings ) opts.map.prev = map; - var options = this.options.postcss; + var options = params.options || this.options.postcss; if ( typeof options === 'function' ) { options = options.call(this, this); } From 1054251ba082f19cc1c8d7cf25468edddb050b9c Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Fri, 7 Oct 2016 08:28:23 -0700 Subject: [PATCH 2/2] Use `params.plugins` instead of `params.options`. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f019cc90..3479dbc5 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ module.exports = function (source, map) { if ( typeof map === 'string' ) map = JSON.parse(map); if ( map && map.mappings ) opts.map.prev = map; - var options = params.options || this.options.postcss; + var options = params.plugins || this.options.postcss; if ( typeof options === 'function' ) { options = options.call(this, this); }