Skip to content

Commit 9678781

Browse files
committed
Use absolute path so minified inlined CSS works
1 parent bb7a181 commit 9678781

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

website/install-fonts.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ FILES_TO_COPY.forEach(([source, dest]) => {
5858
processedDestinations.add(destPath);
5959
console.log(`Copied: ${sourcePath}${destPath}`);
6060
}
61+
62+
// Replace all occurrences of "./files" with "/fonts" in the destination file
63+
let destFileContent = fs.readFileSync(destPath, "utf8");
64+
destFileContent = destFileContent.replaceAll("./files/", "/fonts/files/");
65+
fs.writeFileSync(destPath, destFileContent);
6166
} catch (error) {
6267
console.error(`Error processing ${sourcePath} to ${destPath}:`, error);
6368
process.exit(1);

0 commit comments

Comments
 (0)