mirror of
https://github.com/withastro/astro.git
synced 2025-01-22 10:31:53 -05:00
Remove react integration ssr.external config (#12996)
This commit is contained in:
parent
627aec3f04
commit
80c6801b4f
3 changed files with 5 additions and 4 deletions
5
.changeset/many-pianos-develop.md
Normal file
5
.changeset/many-pianos-develop.md
Normal file
|
@ -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.
|
|
@ -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',
|
||||
|
|
|
@ -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…
Reference in a new issue