reverse query param hack to re-add sourcemap support

This commit is contained in:
Jacky Zhao 2023-08-05 17:53:29 -07:00
parent 1da467d214
commit a0d651d64d
4 changed files with 33 additions and 3 deletions

View file

@ -298,14 +298,15 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
outfile: path.join("quartz", cacheFile),
bundle: true,
keepNames: true,
minify: true,
minifyWhitespace: true,
minifySyntax: true,
platform: "node",
format: "esm",
jsx: "automatic",
jsxImportSource: "preact",
packages: "external",
metafile: true,
sourcemap: "inline",
sourcemap: true,
sourcesContent: false,
plugins: [
sassPlugin({
@ -374,6 +375,7 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
}
// bypass module cache
// https://github.com/nodejs/modules/issues/307
const { default: buildQuartz } = await import(cacheFile + `?update=${randomUUID()}`)
await buildQuartz(argv, clientRefresh)
clientRefresh()