Initial commit

This commit is contained in:
kirbara 2025-12-02 09:52:11 +07:00
commit 3f501820b1
Signed by: exp
GPG key ID: D7E63AD0019E75D9
173 changed files with 24001 additions and 0 deletions

18
quartz/util/sourcemap.ts Executable file
View file

@ -0,0 +1,18 @@
import fs from "fs"
import sourceMapSupport from "source-map-support"
import { fileURLToPath } from "url"
export const options: sourceMapSupport.Options = {
// source map hack to get around query param
// import cache busting
retrieveSourceMap(source) {
if (source.includes(".quartz-cache")) {
let realSource = fileURLToPath(source.split("?", 2)[0] + ".map")
return {
map: fs.readFileSync(realSource, "utf8"),
}
} else {
return null
}
},
}