better concurrency debugging, --concurrency flag for npx quartz build

This commit is contained in:
Jacky Zhao
2023-08-08 22:52:49 -07:00
parent e4950e06a1
commit 49bd6bc3ff
9 changed files with 62 additions and 28 deletions

19
quartz/sourcemap.ts Normal file
View File

@ -0,0 +1,19 @@
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
}
},
}