Skip to content

Commit ba25ecf

Browse files
committed
Bundle React shim in server output
1 parent cd54035 commit ba25ecf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ const useSyncExternalStoreShimIndexAlias = {
7575
replacement: '@tanstack/redact',
7676
}
7777

78+
const reactShimNoExternals = ['@tanstack/redact']
79+
7880
export default defineConfig({
7981
envDir,
8082
resolve: {
@@ -107,6 +109,7 @@ export default defineConfig({
107109
environments: {
108110
rsc: {
109111
resolve: {
112+
noExternal: reactShimNoExternals,
110113
external: [
111114
'@tanstack/react-start-server',
112115
'@tanstack/react-router/ssr/server',
@@ -140,6 +143,7 @@ export default defineConfig({
140143
'normalize-wheel',
141144
'@tanstack/react-hotkeys',
142145
'@webcontainer/api',
146+
...reactShimNoExternals,
143147
],
144148
},
145149
optimizeDeps: {

0 commit comments

Comments
 (0)