From 09afdeb04cd394a8f45d2ad2bc9404f070dc4057 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 3 Jul 2024 23:51:17 +0200 Subject: [PATCH] [backend] Fix build on Node 22 --- packages/backend/src/server/web/manifest.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/web/manifest.ts b/packages/backend/src/server/web/manifest.ts index e1bee8aae..723458afb 100644 --- a/packages/backend/src/server/web/manifest.ts +++ b/packages/backend/src/server/web/manifest.ts @@ -1,12 +1,12 @@ import type Koa from "koa"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import manifest from "./manifest.json" assert { type: "json" }; +import fs from "fs"; +import path from 'path'; + +const manifest = JSON.parse(fs.readFileSync(path.resolve('./src/server/web/manifest.json'), 'utf-8')); export const manifestHandler = async (ctx: Koa.Context) => { - // TODO - //const res = structuredClone(manifest); - const res = JSON.parse(JSON.stringify(manifest)); - + const res = manifest; const instance = await fetchMeta(true); res.short_name = instance.name || "Iceshrimp";