15 lines
358 B
JavaScript
15 lines
358 B
JavaScript
import fs from 'fs'
|
|
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()
|
|
}
|
|
})
|
|
}
|
|
}
|