This commit is contained in:
Mauro Balades 2024-08-18 00:54:32 +02:00
commit a08a51eea3
241 changed files with 23091 additions and 0 deletions

18
quartz/util/sourcemap.ts Normal 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
}
},
}