chore: try to use zeabur adapter instead.
This commit is contained in:
parent
fd690aff57
commit
4673e7c420
@ -1,5 +1,5 @@
|
|||||||
import mdx from '@astrojs/mdx';
|
import mdx from '@astrojs/mdx';
|
||||||
import node from '@astrojs/node';
|
import zeabur from '@zeabur/astro-adapter/serverless';
|
||||||
import { uploader } from 'astro-uploader';
|
import { uploader } from 'astro-uploader';
|
||||||
import { defineConfig, envField } from 'astro/config';
|
import { defineConfig, envField } from 'astro/config';
|
||||||
import rehypeExternalLinks from 'rehype-external-links';
|
import rehypeExternalLinks from 'rehype-external-links';
|
||||||
@ -47,9 +47,7 @@ export default defineConfig({
|
|||||||
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY as string,
|
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY as string,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
adapter: node({
|
adapter: zeabur(),
|
||||||
mode: 'standalone',
|
|
||||||
}),
|
|
||||||
markdown: {
|
markdown: {
|
||||||
gfm: true,
|
gfm: true,
|
||||||
shikiConfig: {
|
shikiConfig: {
|
||||||
|
2606
package-lock.json
generated
2606
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@
|
|||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"lint": "biome check --write --use-server . && prettier . --write",
|
"lint": "biome check --write --use-server . && prettier . --write",
|
||||||
"prepare": "npx husky",
|
"prepare": "npx husky",
|
||||||
|
"postinstall": "patch-package",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"start": "astro dev"
|
"start": "astro dev"
|
||||||
},
|
},
|
||||||
@ -42,8 +43,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^3.1.2",
|
"@astrojs/mdx": "^3.1.2",
|
||||||
"@astrojs/node": "^8.3.2",
|
|
||||||
"@astrojs/rss": "^4.0.7",
|
"@astrojs/rss": "^4.0.7",
|
||||||
|
"@zeabur/astro-adapter": "^1.0.5",
|
||||||
"astro": "^4.11.6",
|
"astro": "^4.11.6",
|
||||||
"drizzle-orm": "^0.32.0",
|
"drizzle-orm": "^0.32.0",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
@ -67,6 +68,7 @@
|
|||||||
"aplayer": "^1.10.1",
|
"aplayer": "^1.10.1",
|
||||||
"astro-uploader": "^1.1.3",
|
"astro-uploader": "^1.1.3",
|
||||||
"bootstrap": "^5.3.3",
|
"bootstrap": "^5.3.3",
|
||||||
|
"patch-package": "^8.0.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"prettier-plugin-astro": "^0.14.1",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
||||||
|
16
patches/@zeabur+astro-adapter+1.0.5.patch
Normal file
16
patches/@zeabur+astro-adapter+1.0.5.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/node_modules/@zeabur/astro-adapter/dist/serverless/entrypoint.js b/node_modules/@zeabur/astro-adapter/dist/serverless/entrypoint.js
|
||||||
|
index 6eaac22..79eb1fc 100644
|
||||||
|
--- a/node_modules/@zeabur/astro-adapter/dist/serverless/entrypoint.js
|
||||||
|
+++ b/node_modules/@zeabur/astro-adapter/dist/serverless/entrypoint.js
|
||||||
|
@@ -2,6 +2,11 @@ import { App } from "astro/app";
|
||||||
|
import { applyPolyfills } from "astro/app/node";
|
||||||
|
import { ASTRO_LOCALS_HEADER } from "./adapter.js";
|
||||||
|
import { getRequest, setResponse } from "./request-transform.js";
|
||||||
|
+
|
||||||
|
+await import('astro/env/setup')
|
||||||
|
+ .then((mod) => mod.setGetEnv((key) => process.env[key]))
|
||||||
|
+ .catch(() => {});
|
||||||
|
+
|
||||||
|
applyPolyfills();
|
||||||
|
const createExports = (manifest) => {
|
||||||
|
const app = new App(manifest);
|
Loading…
Reference in New Issue
Block a user