From 46714008133a9e7f50d512be04c57971f6e9211a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E9=87=8E=E6=95=AC=E5=A4=AA=E9=83=8E?= Date: Mon, 16 Sep 2024 21:19:29 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=82=E3=81=86=E4=BD=95=E3=82=82?= =?UTF-8?q?=E3=82=8F=E3=81=8B=E3=82=89=E3=82=93=E3=81=AA=E3=82=B3=E3=83=9F?= =?UTF-8?q?=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + astro.config.mjs | 6 +++++- package.json | 9 +++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2bc0d75..a32c5c0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ playwright-report/ playwright/.cache/ .astro/ +.wrangler/ diff --git a/astro.config.mjs b/astro.config.mjs index 33f2adc..007fb05 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,7 +19,11 @@ export default defineConfig({ }, }, output: "hybrid", - adapter: cloudflare({ mode: "directory" }), + adapter: cloudflare({ + mode: "directory", + functionPerRoute: true, + imageService: "compile", + }), build: { inlineStylesheets: "auto", }, diff --git a/package.json b/package.json index f8e0a69..361fc77 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,14 @@ "dev": "TAILWIND_MODE=watch astro dev", "start": "astro dev", "build": "astro build", - "preview": "astro preview", + "preview:astro": "astro preview", "astro": "astro", - "gen-blog": "plop blog" + "gen-blog": "plop blog", + "preview:cf": "wrangler pages dev ./dist --compatibility-flags='nodejs_compat'" + }, + "browser": { + "fs": false, + "child_process": false }, "dependencies": { "@astrojs/cloudflare": "11.0.4",