Skip to content

Commit 8583da7

Browse files
feat: upgrade astro to 5.0 (#321)
1 parent fc8f4b1 commit 8583da7

File tree

6 files changed

+666
-950
lines changed

6 files changed

+666
-950
lines changed

astro.config.ts renamed to astro.config.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
// @ts-check
12
import { dirname, resolve } from 'node:path';
23
import { fileURLToPath } from 'node:url';
34
import cloudflare from '@astrojs/cloudflare';
45
import starlight from '@astrojs/starlight';
56
import { defineConfig } from 'astro/config';
7+
import { builtinModules } from 'node:module';
68

79
export default defineConfig({
810
site: process.env.DEPLOY_URL ?? 'https://astro-tips.dev',
@@ -11,9 +13,6 @@ export default defineConfig({
1113
'/contributing': '/#want-to-get-involved',
1214
'/resources/educational': '/external-resources',
1315
},
14-
experimental: {
15-
serverIslands: true,
16-
},
1716
integrations: [
1817
starlight({
1918
title: 'Astro Tips',
@@ -74,8 +73,11 @@ export default defineConfig({
7473
'~': resolve(dirname(fileURLToPath(import.meta.url)), './src'),
7574
},
7675
},
76+
ssr: {
77+
external: [...builtinModules, ...builtinModules.map(mod => `node:${mod}`)],
78+
},
7779
},
78-
output: 'hybrid',
80+
output: 'server',
7981
adapter: cloudflare({
8082
imageService: 'passthrough',
8183
}),

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "astro-tips",
33
"type": "module",
44
"version": "0.0.1",
5-
"packageManager": "[email protected].3",
5+
"packageManager": "[email protected].4",
66
"scripts": {
77
"dev": "astro dev",
88
"start": "astro dev",
@@ -15,24 +15,24 @@
1515
},
1616
"dependencies": {
1717
"@astrojs/check": "0.9.4",
18-
"@astrojs/cloudflare": "11.2.0",
19-
"@astrojs/starlight": "0.29.3",
20-
"astro": "4.16.18",
18+
"@astrojs/cloudflare": "12.2.0",
19+
"@astrojs/starlight": "0.31.1",
20+
"astro": "5.1.7",
2121
"semver": "7.6.3",
2222
"sharp": "0.33.5",
2323
"starlight-package-managers": "0.9.0",
24-
"typescript": "5.7.2"
24+
"typescript": "5.7.3"
2525
},
2626
"devDependencies": {
2727
"@biomejs/biome": "1.9.4",
2828
"@types/github-script": "github:actions/github-script",
2929
"@types/mdast": "4.0.4",
30-
"@types/node": "20.17.12",
30+
"@types/node": "20.17.14",
3131
"@types/semver": "7.5.8",
3232
"mdast-util-mdx": "3.0.0",
3333
"mdast-util-to-markdown": "2.1.2",
3434
"prettier": "3.4.2",
3535
"prettier-plugin-astro": "0.14.1",
36-
"wrangler": "3.99.0"
36+
"wrangler": "3.103.2"
3737
}
3838
}

0 commit comments

Comments
 (0)