🐛 Bug fixes for cloudflare pages

This commit is contained in:
LittleSheep 2024-02-12 11:50:43 +08:00
parent 9b0a2cb881
commit f83c7bd8a6
3 changed files with 8876 additions and 9 deletions

View File

@ -3,17 +3,14 @@ import { defineConfig } from "astro/config";
import react from "@astrojs/react"; import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind"; import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap"; import sitemap from "@astrojs/sitemap";
import cloudflare from "@astrojs/cloudflare";
import node from "@astrojs/node";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
output: "hybrid", output: "hybrid",
site: "https://smartsheep.studio", site: "https://smartsheep.studio",
integrations: [tailwind(), react(), sitemap()], integrations: [tailwind(), react(), sitemap()],
adapter: node({ adapter: cloudflare(),
mode: "standalone",
}),
redirects: { redirects: {
"/p/[...slug]": "/posts/[...slug]", "/p/[...slug]": "/posts/[...slug]",
}, },

8869
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.4.1", "@astrojs/check": "^0.4.1",
"@astrojs/cloudflare": "^9.0.0",
"@astrojs/node": "^8.0.0", "@astrojs/node": "^8.0.0",
"@astrojs/react": "^3.0.9", "@astrojs/react": "^3.0.9",
"@astrojs/sitemap": "^3.0.5", "@astrojs/sitemap": "^3.0.5",
@ -22,26 +23,26 @@
"@videojs-player/react": "^1.0.0", "@videojs-player/react": "^1.0.0",
"@videojs/themes": "^1.0.1", "@videojs/themes": "^1.0.1",
"aplayer": "^1.10.1", "aplayer": "^1.10.1",
"artplayer": "^5.1.1",
"astro": "^4.2.1", "astro": "^4.2.1",
"dompurify": "^3.0.8", "dompurify": "^3.0.8",
"html-react-parser": "^5.1.2", "html-react-parser": "^5.1.2",
"marked": "^12.0.0", "marked": "^12.0.0",
"medium-zoom": "^1.1.0", "medium-zoom": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"react": "^18.2.0", "react": "^17",
"react-dom": "^18.2.0", "react-dom": "^17",
"sass": "^1.70.0", "sass": "^1.70.0",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
"theme-change": "^2.5.0", "theme-change": "^2.5.0",
"typescript": "^5.3.3", "typescript": "^5.3.3",
"video.js": "^8.10.0" "video.js": "^7"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
"@types/dompurify": "^3.0.5", "@types/dompurify": "^3.0.5",
"@types/node": "^20.11.5", "@types/node": "^20.11.5",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@types/video.js": "^7.3.56",
"daisyui": "^4.6.0", "daisyui": "^4.6.0",
"prettier": "^3.2.4" "prettier": "^3.2.4"
} }