mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-10-29 13:11:10 +08:00
PostCSS loader has to be the third item in the pipe
This commit is contained in:
1 parent
98ffadd612
commit
0e3b554855
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user