Skip to content

Commit

Permalink
feat: astro versionbump + custom 404 - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseKoldewijn committed Sep 1, 2023
1 parent 392b2bd commit aab86da
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 1,148 deletions.
25 changes: 23 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import node from "@astrojs/node";
import prefetch from "@astrojs/prefetch";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import vercel from "@astrojs/vercel/edge";
import vercel from "@astrojs/vercel/serverless";
import Compress from "astro-compress";
import { VitePWA } from "vite-plugin-pwa";

Expand All @@ -17,7 +17,28 @@ const isDev = process.env.NODE_ENV === "development";
export default defineConfig({
output: "server",
adapter: !isDocker
? vercel()
? vercel({
edgeMiddleware: {
priority: "high",
handlers: [
{
route: "/(.*)",
handler: "cache",
options: {
cacheKey: "astro-cache",
edge: {
maxAgeSeconds: 60 * 60 * 24 * 365,
staleWhileRevalidateSeconds: 60 * 60 * 24 * 365,
},
browser: {
maxAgeSeconds: 60 * 60 * 24 * 365,
serviceWorkerSeconds: 60 * 60 * 24 * 365,
},
},
},
],
},
})
: node({
mode: "standalone",
}),
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,34 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^5.3.6",
"@astrojs/node": "^6.0.0",
"@astrojs/prefetch": "^0.3.0",
"@astrojs/react": "^2.3.2",
"@astrojs/sitemap": "^2.0.2",
"@astrojs/ts-plugin": "^1.1.1",
"@astrojs/vercel": "^3.8.2",
"@astrojs/ts-plugin": "^1.1.3",
"@astrojs/vercel": "^4.0.3",
"@glitchtech-dev/react-motion": "^1.5.1",
"@heroicons/react": "^2.0.18",
"astro": "^2.10.13",
"astro-seo": "^0.7.6",
"jquery": "^3.7.0",
"astro": "^3.0.6",
"astro-seo": "^0.8.0",
"jquery": "^3.7.1",
"motion": "^10.16.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"tailwind-merge": "^1.14.0"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/jquery": "^3.5.17",
"@types/jquery": "^3.5.18",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro-compress": "^2.0.14",
"astro-compress": "^2.0.15",
"autoprefixer": "^10.4.15",
"cssnano": "^6.0.1",
"postcss": "^8.4.28",
"prettier": "^3.0.2",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0",
"prettier-plugin-tailwindcss": "^0.5.3",
"prettier-plugin-tailwindcss": "^0.5.4",
"sharp": "^0.32.5",
"tailwindcss": "^3.3.3",
"vite-plugin-pwa": "^0.16.4"
Expand Down
Loading

0 comments on commit aab86da

Please sign in to comment.