Skip to content

Commit 1e7dd93

Browse files
committed
also repsect external autoprefixer options
1 parent 4d45aed commit 1e7dd93

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/style-rewriter.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var postcss = require('postcss')
22
var selectorParser = require('postcss-selector-parser')
33
var hash = require('hash-sum')
44
var loaderUtils = require('loader-utils')
5+
var assign = require('object-assign')
56

67
var currentId
78
var addId = postcss.plugin('add-id', function () {
@@ -42,7 +43,12 @@ module.exports = function (css) {
4243
processors.push(addId)
4344
}
4445
if (autoprefixOptions !== false) {
45-
autoprefixOptions = autoprefixOptions || { remove: false }
46+
autoprefixOptions = assign(
47+
{},
48+
// also respect autoprefixer-loader options
49+
this.options.autoprefixer,
50+
autoprefixOptions
51+
)
4652
var autoprefixer = require('autoprefixer')(autoprefixOptions)
4753
processors.push(autoprefixer)
4854
}

0 commit comments

Comments
 (0)