Provide our own rawCache to avoid performance issues

This commit is contained in:
Adam Wathan 2019-01-11 12:10:26 -05:00
parent 0d333f2241
commit eeb42cd6bb

View file

@ -29,6 +29,22 @@ export default function(getConfig) {
substituteResponsiveAtRules(config),
substituteScreenAtRules(config),
substituteClassApplyAtRules(config, utilities),
function (root, result) {
root.rawCache = {
colon: ': ',
indent: ' ',
beforeDecl: '\n',
beforeRule: '\n',
beforeOpen: ' ',
beforeClose: '\n',
beforeComment: '\n',
after: '\n',
emptyBody: '',
commentLeft: ' ',
commentRight: ' ',
semicolon: false
}
},
]).process(css, { from: _.get(css, 'source.input.file') })
}
}