chore: Move i18n generation, pre-commit hooks (#3410)
This commit is contained in:
@@ -133,9 +133,12 @@ router.get("/locales/:lng.json", async (ctx) => {
|
||||
|
||||
await send(ctx, path.join(lng, "translation.json"), {
|
||||
setHeaders: (res) => {
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
res.setHeader("Cache-Control", `max-age=${7 * 24 * 60 * 60}`);
|
||||
}
|
||||
res.setHeader(
|
||||
"Cache-Control",
|
||||
process.env.NODE_ENV === "production"
|
||||
? `max-age=${7 * 24 * 60 * 60}`
|
||||
: "no-cache"
|
||||
);
|
||||
},
|
||||
root: path.join(__dirname, "../../shared/i18n/locales"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user