Use htmx.js instead of htmx.min.js

This wastes 30 kB gzipped, which I think is acceptable in exchange for
having method names in the debugger.
This commit is contained in:
Cadence Ember
2025-01-31 16:42:15 +13:00
parent b1b9124052
commit a459ee1d1c
4 changed files with 5352 additions and 92 deletions

View File

@@ -49,12 +49,12 @@ as.router.get("/static/stacks.min.css", defineEventHandler({
}
}))
as.router.get("/static/htmx.min.js", defineEventHandler({
as.router.get("/static/htmx.js", defineEventHandler({
onBeforeResponse: compressResponse,
handler: async event => {
handleCacheHeaders(event, {maxAge: 86400})
defaultContentType(event, "text/javascript")
return fs.promises.readFile(join(__dirname, "static", "htmx.min.js"), "utf-8")
return fs.promises.readFile(join(__dirname, "static", "htmx.js"), "utf-8")
}
}))