diff --git a/src/lib/substituteTailwindAtRules.js b/src/lib/substituteTailwindAtRules.js index 70cdaa10ce79..c03dbbace5db 100644 --- a/src/lib/substituteTailwindAtRules.js +++ b/src/lib/substituteTailwindAtRules.js @@ -13,9 +13,13 @@ export default function(config) { css.walkAtRules('tailwind', atRule => { if (atRule.params === 'preflight') { - atRule.before( - postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8')) + const preflightTree = postcss.parse( + fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8') ) + + preflightTree.walk(node => (node.source = atRule.source)) + + atRule.before(preflightTree) atRule.remove() }