mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
✌️
This commit is contained in:
parent
514320ebdc
commit
78d31e3518
@ -31,7 +31,9 @@ const router = new Router();
|
||||
//#region static assets
|
||||
|
||||
router.get('/assets/*', async ctx => {
|
||||
await send(ctx, ctx.path, {
|
||||
// 無圧縮スクリプトを用意するのは大変なので一時的に無効化
|
||||
const path = process.env.NODE_ENV == 'production' ? ctx.path.replace('raw.js', 'min.js') : ctx.path.replace('min.js', 'raw.js');
|
||||
await send(ctx, path, {
|
||||
root: client,
|
||||
maxage: ms('7 days'),
|
||||
immutable: true
|
||||
|
@ -40,8 +40,12 @@ global['base64replacement'] = (_, key) => {
|
||||
|
||||
const langs = Object.keys(locales);
|
||||
|
||||
// 無圧縮スクリプトを用意するのは重いので一時的に無効化
|
||||
//const entries = process.env.NODE_ENV == 'production'
|
||||
// ? langs.map(l => [l, false]).concat(langs.map(l => [l, true]))
|
||||
// : langs.map(l => [l, false]);
|
||||
const entries = process.env.NODE_ENV == 'production'
|
||||
? langs.map(l => [l, false]).concat(langs.map(l => [l, true]))
|
||||
? langs.map(l => [l, true])
|
||||
: langs.map(l => [l, false]);
|
||||
|
||||
module.exports = entries.map(x => {
|
||||
|
Loading…
Reference in New Issue
Block a user