Skip to content

Commit a74a8a3

Browse files
committed
Make loadReactClientManifest always CJS
1 parent 6215de3 commit a74a8a3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

node_package/src/ReactOnRailsRSC.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
streamServerRenderedComponent,
1313
transformRenderStreamChunksToResultObject,
1414
} from './streamServerRenderedReactComponent.ts';
15-
import loadReactClientManifest from './loadReactClientManifest.ts';
15+
import loadReactClientManifest from './loadReactClientManifest.cts';
1616

1717
const stringToStream = (str: string) => {
1818
const stream = new PassThrough();

node_package/src/loadReactClientManifest.ts renamed to node_package/src/loadReactClientManifest.cts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default async function loadReactClientManifest(reactClientManifestFileNam
88
// React client manifest is uploaded to node renderer as an asset.
99
// Renderer copies assets to the same place as the server-bundle.js and rsc-bundle.js.
1010
// Thus, the __dirname of this code is where we can find the manifest file.
11+
// And we need to be .cts to use __dirname
1112
const manifestPath = path.resolve(__dirname, reactClientManifestFileName);
1213
const loadedReactClientManifest = loadedReactClientManifests.get(manifestPath);
1314
if (loadedReactClientManifest) {

0 commit comments

Comments
 (0)