Skip to content

Commit c9cbd7e

Browse files
khadniaelmanaa
andauthored
Astro v5 & dependencies update (#2349)
* Astro v5 --------- Co-authored-by: Karim H. <[email protected]> Co-authored-by: Amine E. <[email protected]> Co-authored-by: aelmanaa <[email protected]>
1 parent dc3150f commit c9cbd7e

File tree

259 files changed

+14486
-18635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+14486
-18635
lines changed
File renamed without changes.

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ jobs:
8585
8686
- name: Install Dependencies
8787
run: npm ci
88+
89+
- name: Generate Astro types
90+
run: npx astro sync
8891

8992
- name: Check Types
9093
run: npm run typecheck

astro.config.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig } from "astro/config"
2-
import vercel from "@astrojs/vercel/serverless"
2+
import vercel from "@astrojs/vercel"
33
import preact from "@astrojs/preact"
44
import react from "@astrojs/react"
55
import mdx from "@astrojs/mdx"
@@ -10,6 +10,7 @@ import sitemap from "@astrojs/sitemap"
1010
import { RehypePlugins } from "@astrojs/markdown-remark"
1111
import yaml from "@rollup/plugin-yaml"
1212
import { ccipRedirects } from "./src/config/redirects/ccip"
13+
import trailingSlashMiddleware from "./src/integrations/trailing-slash-middleware"
1314

1415
// https://astro.build/config
1516
export default defineConfig({
@@ -22,6 +23,7 @@ export default defineConfig({
2223
...ccipRedirects,
2324
},
2425
integrations: [
26+
trailingSlashMiddleware(),
2527
preact({
2628
include: ["**/preact/*"],
2729
}),
@@ -46,9 +48,13 @@ export default defineConfig({
4648
syntaxHighlight: "prism",
4749
smartypants: false,
4850
},
49-
output: "hybrid",
51+
// output: 'static' (fully static or partial SSR with `prerender = false` ==> export const prerender = false;)
52+
output: "static",
5053
adapter: vercel(),
5154
vite: {
5255
plugins: [yaml()],
5356
},
57+
legacy: {
58+
collections: false,
59+
},
5460
})

codegen.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ const config: CodegenConfig = {
2424
documents: "src/graphql/queries/**/*.gql",
2525
generates: {
2626
"src/graphql/generated.ts": {
27-
plugins: ["typescript", "typescript-operations", "typescript-graphql-request"],
27+
plugins: ["typescript", "typescript-operations", "typescript-react-apollo"],
2828
config: {
2929
avoidOptionals: true,
30+
gqlImport: "graphql-tag#gql",
31+
documentMode: "documentNode",
32+
dedupeFragments: true,
3033
},
3134
},
3235
},

global.d.ts

-10
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)