From fefbe213ad43863e0c69bf767c803c4e57a3f7b3 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Thu, 12 Sep 2024 16:39:19 +0200 Subject: [PATCH] fix(build): create cache folder if it doesn't exist --- build/manifestPlugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/manifestPlugin.ts b/build/manifestPlugin.ts index f88070c..6ad4a4f 100644 --- a/build/manifestPlugin.ts +++ b/build/manifestPlugin.ts @@ -1,5 +1,5 @@ import { Plugin } from "vite"; -import { readFile, writeFile } from "fs/promises"; +import { mkdir, readFile, writeFile } from "fs/promises"; import { spawnSync } from "child_process"; import { Octokit, RestEndpointMethodTypes } from "@octokit/rest"; import { env } from "./env"; @@ -56,6 +56,7 @@ export const manifest = (): Plugin => ({ if (storedUpdatedAt === manifestRepo.updated_at) return; } catch {} + await mkdir("./node_modules/.cache"); await writeFile("./node_modules/.cache/assets", manifestRepo.updated_at); const getRepoFileContent = async (repo: string, path: string) => {