From eeb42cd6bb9eb2a6e812e805aba4b27258395f51 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 11 Jan 2019 12:10:26 -0500 Subject: [PATCH] Provide our own rawCache to avoid performance issues --- src/processTailwindFeatures.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/processTailwindFeatures.js b/src/processTailwindFeatures.js index 189df0bdb..a3e6f7fe4 100644 --- a/src/processTailwindFeatures.js +++ b/src/processTailwindFeatures.js @@ -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') }) } }