File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -947,7 +947,7 @@ import.meta.hot.on("rsc:update", () => {
947947 } ,
948948 ) ,
949949 {
950- // make `AsyncLocalStorage` available globally for React request context on edge build (e.g. React.cache, ssr preload)
950+ // make `AsyncLocalStorage` available globally for React edge build (required for React.cache, ssr preload, etc. )
951951 // https://github.com/facebook/react/blob/f14d7f0d2597ea25da12bcf97772e8803f2a394c/packages/react-server/src/forks/ReactFlightServerConfig.dom-edge.js#L16-L19
952952 name : 'rsc:inject-async-local-storage' ,
953953 transform : {
@@ -970,20 +970,6 @@ import.meta.hot.on("rsc:update", () => {
970970 }
971971 } ,
972972 } ,
973- // banner(chunk) {
974- // if (
975- // (this.environment.name === 'ssr' ||
976- // this.environment.name === 'rsc') &&
977- // this.environment.mode === 'build' &&
978- // chunk.isEntry
979- // ) {
980- // return `\
981- // import * as __viteRscAyncHooks from "node:async_hooks";
982- // globalThis.AsyncLocalStorage = __viteRscAyncHooks.AsyncLocalStorage;
983- // `
984- // }
985- // return ''
986- // },
987973 } ,
988974 ...vitePluginRscMinimal ( rscPluginOptions , manager ) ,
989975 ...vitePluginFindSourceMapURL ( ) ,
You can’t perform that action at this time.
0 commit comments