Skip to content

Commit edc2649

Browse files
committed
chore: cleanup
1 parent c961f9a commit edc2649

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

packages/plugin-rsc/src/plugin.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff 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(),

0 commit comments

Comments
 (0)