Open AlecRust opened 1 year ago
In case anyone finds it useful, you can create an inline PostCSS plugin to avoid use of this plugin e.g.
// Replace the webfont paths hardcoded in Font Awesome's CSS
const fixWebfontPaths = root => {
root.walkDecls(decl => {
decl.value = decl.value.replace(/\.\.\/webfonts\//g, '/_static/webfonts/')
})
}
const css = await readFile('input.pcss')
const processed = await postcss([
postcssImport(),
postcssPresetEnv({ stage: 1 }),
fixWebfontPaths
]).process(css, { from: 'input.pcss', to: 'output.css' })
Any plans to update this to use PostCSS 8? 🙂