Skip to content

Commit

Permalink
Dep updates + React 19 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdiliberto committed Jan 2, 2025
1 parent 55fbbe3 commit 1b8e48c
Show file tree
Hide file tree
Showing 4 changed files with 873 additions and 627 deletions.
14 changes: 13 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import cloudflare from '@astrojs/cloudflare';
export default defineConfig({
site: 'https://scsheltierescue.com',
integrations: [react(), tailwind(), icon(), sitemap()],
output: 'hybrid',
output: 'static',
adapter: cloudflare(),
image: {
service: passthroughImageService()
Expand All @@ -19,6 +19,18 @@ export default defineConfig({
build: {
sourcemap: true,
},
resolve: {
// Temporary Workaround
// SEE: https://github.com/withastro/adapters/pull/436#issuecomment-2525190557
//
// Use react-dom/server.edge instead of react-dom/server.browser for React 19.
// Without this, MessageChannel from node:worker_threads needs to be polyfilled.
//
// @ts-ignore
alias: import.meta.env.PROD && {
'react-dom/server': 'react-dom/server.edge',
},
},
define: {
'process.env.PETFINDER_API_CLIENT_ID': JSON.stringify(process.env.PETFINDER_API_CLIENT_ID),
'process.env.PETFINDER_API_SECRET': JSON.stringify(process.env.PETFINDER_API_SECRET)
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@
"dev": "wrangler types && astro dev",
"preinstall": "npx only-allow pnpm",
"preview": "wrangler types && wrangler pages dev ./dist",
"start": "wrangler types && astro dev"
"start": "wrangler types && astro dev",
"upgrade": "npx @astrojs/upgrade"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^11.2.0",
"@astrojs/react": "^3.6.3",
"@astrojs/cloudflare": "^12.1.0",
"@astrojs/react": "^4.1.2",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.4",
"@cloudflare/workers-types": "^4.20241230.0",
"astro": "^4.16.18",
"astro": "^5.1.2",
"astro-icon": "^1.1.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-slick": "0.30.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-slick": "0.30.3",
"sharp": "^0.33.5",
"slick-carousel": "^1.8.1",
"tailwindcss": "^3.4.17",
"yet-another-react-lightbox": "^3.21.7"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@types/react-slick": "^0.23.13",
"pnpm": "8.7.1",
"typescript": "^5.7.2",
Expand Down
Loading

0 comments on commit 1b8e48c

Please sign in to comment.