Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove react integration ssr.external config
  • Loading branch information
bluwy committed Jan 16, 2025
commit e8b121d04afed56b83f98032f6e9c0243806925b
5 changes: 5 additions & 0 deletions .changeset/many-pianos-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/react': patch
---

Removes hardcoded `ssr.external: ['react-dom/server', 'react-dom/client']` config that causes issues with adapters that bundle all dependencies (e.g. Cloudflare). These externals should already be inferred by default by Vite when deploying to a server environment.
1 change: 0 additions & 1 deletion packages/integrations/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function getViteConfiguration(
},
plugins: [react({ include, exclude, babel }), optionsPlugin(!!experimentalReactChildren)],
ssr: {
external: reactConfig.externals,
noExternal: [
// These are all needed to get mui to work.
'@mui/material',
Expand Down
3 changes: 0 additions & 3 deletions packages/integrations/react/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ export const versionsConfig = {
17: {
server: '@astrojs/react/server-v17.js',
client: '@astrojs/react/client-v17.js',
externals: ['react-dom/server.js', 'react-dom/client.js'],
},
18: {
server: '@astrojs/react/server.js',
client: '@astrojs/react/client.js',
externals: ['react-dom/server', 'react-dom/client'],
},
19: {
server: '@astrojs/react/server.js',
client: '@astrojs/react/client.js',
externals: ['react-dom/server', 'react-dom/client'],
},
};
Loading