mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
PostCSS loader has to be the third item in the pipe
This commit is contained in:
@@ -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