Closed SergeyKrasnolobov closed 1 month ago
relative paths does not resolve correctly in css when different dir's level
failed case
// dir_1/index.css @import url('../dir_2/b.css'); // dir_2/b.css @font-face { font-family: 'Any font'; src: url('./font.woff2') format('woff2'); }
import { bundle } from 'lightningcss'; import fs from 'node:fs'; const rawCss = fs.readFileSync('./dir_1/index.css') const res = bundle({ filename: 'index.css', minify: true, code: Buffer.from(rawCss) }); console.log(res.code.toString());
relative paths does not resolve correctly in css when different dir's level
failed case