From 3138829984f0109b69d73cb420c8d7f757750f67 Mon Sep 17 00:00:00 2001 From: hookor Date: Thu, 30 May 2024 16:41:33 +0900 Subject: [PATCH] Hotfix: upadte puppeteer script --- .gitignore | 3 +++ .puppeteerrc.cjs | 9 +++++++++ package.json | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .puppeteerrc.cjs diff --git a/.gitignore b/.gitignore index 5659261c..4ce8f62a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ dist-ssr .env.local .env.production .env.development + +# Puppeteer +.cache/puppeteer/* \ No newline at end of file diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs new file mode 100644 index 00000000..06aa7498 --- /dev/null +++ b/.puppeteerrc.cjs @@ -0,0 +1,9 @@ +const { join } = require('path'); + +/** + * @type {import("puppeteer").Configuration} + */ +module.exports = { + // Changes the cache location for Puppeteer. + cacheDirectory: join(__dirname, '.cache', 'puppeteer') +}; diff --git a/package.json b/package.json index 05a7b6fe..c5a1a1aa 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "prepare": "panda codegen", "dev": "vite --host 0.0.0.0 --port 3000", - "build": "tsc && pnpm exec panda && vite build", + "build": "tsc && pnpm exec panda && npx puppeteer browsers install chrome && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "panda": "pnpm exec panda",