forked from nixcn/nixcn-web
Impl cloudflare wrangler
- Add astro cloudlfare plugin - Generate cloudflare deploy configs Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -3,6 +3,8 @@ import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
import mdx from '@astrojs/mdx';
|
||||
|
||||
import cloudflare from '@astrojs/cloudflare';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
@@ -35,4 +37,6 @@ export default defineConfig({
|
||||
}),
|
||||
mdx(),
|
||||
],
|
||||
|
||||
adapter: cloudflare(),
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/cloudflare": "^12.6.12",
|
||||
"@astrojs/mdx": "^4.3.12",
|
||||
"@astrojs/starlight": "^0.37.0",
|
||||
"astro": "^5.6.1",
|
||||
|
||||
884
pnpm-lock.yaml
generated
884
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
2
public/.assetsignore
Normal file
2
public/.assetsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
_worker.js
|
||||
_routes.json
|
||||
13
wrangler.jsonc
Normal file
13
wrangler.jsonc
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"main": "dist/_worker.js/index.js",
|
||||
"name": "nixcn-web",
|
||||
"compatibility_date": "2025-12-09",
|
||||
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
|
||||
"assets": {
|
||||
"binding": "ASSETS",
|
||||
"directory": "./dist",
|
||||
},
|
||||
"observability": {
|
||||
"enabled": true,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user