chore: configure cloudflare adapter

This commit is contained in:
Nicola Zambello 2023-05-31 10:17:30 +02:00
parent aab4bc6c4a
commit 81224a2091
Signed by: nzambello
GPG key ID: 56E4A92C2C1E50BA
4 changed files with 1133 additions and 29 deletions

View file

@ -1,9 +1,12 @@
import { defineConfig } from 'astro/config' import { defineConfig } from 'astro/config'
import sitemap from '@astrojs/sitemap' import sitemap from '@astrojs/sitemap'
import cloudflare from '@astrojs/cloudflare'
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://example.com', site: 'https://example.com',
integrations: [sitemap()] integrations: [sitemap()],
output: 'server',
adapter: cloudflare({ mode: 'directory' })
}) })

201
functions/[[path]].js Normal file

File diff suppressed because one or more lines are too long

View file

@ -6,13 +6,17 @@
"dev": "astro dev", "dev": "astro dev",
"start": "astro dev", "start": "astro dev",
"build": "astro build", "build": "astro build",
"preview": "astro preview", "preview-astro": "astro preview",
"preview": "wrangler pages dev ./dist",
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^0.19.1", "@astrojs/cloudflare": "^6.3.0",
"@astrojs/rss": "^2.4.1", "@astrojs/rss": "^2.4.1",
"@astrojs/sitemap": "^1.3.0", "@astrojs/sitemap": "^1.3.0",
"astro": "^2.4.1" "astro": "^2.5.0"
},
"devDependencies": {
"wrangler": "^3.0.1"
} }
} }

944
yarn.lock

File diff suppressed because it is too large Load diff