PostCSS loader has to be the third item in the pipe

This commit is contained in:
stylesuxx
2015-11-22 03:31:05 +01:00
parent 98ffadd612
commit 0e3b554855
+2 -1
View File
@@ -24,7 +24,8 @@ module.exports = {
if(node.type === 'Property' && node.key.name === 'test') {
if(cssDialects.indexOf(node.value.raw) > -1) {
let current = node.parent.properties[1].value.value;
current += '!postcss-loader';
let position = current.split('!', 2).join('!').length;
current = [current.slice(0, position), '!postcss-loader', current.slice(position)].join('');
node.parent.properties[1].value.value = current;
}