sourcemaps

This commit is contained in:
Chris Wanstrath 2026-01-13 15:04:44 -08:00
parent 8f68d2c9c3
commit 714d162c63

View File

@ -154,7 +154,7 @@ export async function transpile(path: string): Promise<string> {
entrypoints: [path], entrypoints: [path],
format: 'esm', format: 'esm',
minify: false, minify: false,
sourcemap: 'none', sourcemap: process.env.NODE_ENV === 'production' ? 'none' : 'inline',
}) })
if (!result.outputs[0]) throw new Error(`Failed to build ${path}`) if (!result.outputs[0]) throw new Error(`Failed to build ${path}`)
@ -169,4 +169,4 @@ export async function transpile(path: string): Promise<string> {
// redirect to the referrer, or fallback if no referrer // redirect to the referrer, or fallback if no referrer
export function redirectBack(c: Context, fallback = "/") { export function redirectBack(c: Context, fallback = "/") {
return c.redirect(c.req.header("Referer") || fallback) return c.redirect(c.req.header("Referer") || fallback)
} }