Skip to content

Commit e8b121d

Browse files
committed
Remove react integration ssr.external config
1 parent df90e6d commit e8b121d

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.changeset/many-pianos-develop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/react': patch
3+
---
4+
5+
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.

packages/integrations/react/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ function getViteConfiguration(
5959
},
6060
plugins: [react({ include, exclude, babel }), optionsPlugin(!!experimentalReactChildren)],
6161
ssr: {
62-
external: reactConfig.externals,
6362
noExternal: [
6463
// These are all needed to get mui to work.
6564
'@mui/material',

packages/integrations/react/src/version.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ export const versionsConfig = {
1919
17: {
2020
server: '@astrojs/react/server-v17.js',
2121
client: '@astrojs/react/client-v17.js',
22-
externals: ['react-dom/server.js', 'react-dom/client.js'],
2322
},
2423
18: {
2524
server: '@astrojs/react/server.js',
2625
client: '@astrojs/react/client.js',
27-
externals: ['react-dom/server', 'react-dom/client'],
2826
},
2927
19: {
3028
server: '@astrojs/react/server.js',
3129
client: '@astrojs/react/client.js',
32-
externals: ['react-dom/server', 'react-dom/client'],
3330
},
3431
};

0 commit comments

Comments
 (0)