From 0e3b55485559fa0b6c7b518cd005df74279849f2 Mon Sep 17 00:00:00 2001 From: stylesuxx Date: Sun, 22 Nov 2015 03:31:05 +0100 Subject: [PATCH] PostCSS loader has to be the third item in the pipe --- generators/app/postcss.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generators/app/postcss.js b/generators/app/postcss.js index e83f531..9bf2377 100644 --- a/generators/app/postcss.js +++ b/generators/app/postcss.js @@ -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; }