diff --git a/src/lib/substituteTailwindPreflightAtRule.js b/src/lib/substituteTailwindPreflightAtRule.js index 24060c3b8..a6a1c5931 100644 --- a/src/lib/substituteTailwindPreflightAtRule.js +++ b/src/lib/substituteTailwindPreflightAtRule.js @@ -4,12 +4,12 @@ import postcss from 'postcss' export default function() { return function(css) { css.walkAtRules('tailwind', atRule => { - if (atRule.params === 'preflight') { - atRule.before( - postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8')) - ) - atRule.remove() + if (atRule.params !== 'preflight') { + return } + + atRule.before(postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8'))) + atRule.remove() }) } }