Skip to content

Commit

Permalink
use json for loader options
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Oct 16, 2023
1 parent 24dfc08 commit 66c1649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/build/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export function getEdgeServerEntry(opts: {
}

return {
import: `next-edge-ssr-loader?${stringify(loaderParams)}!`,
import: `next-edge-ssr-loader?${JSON.stringify(loaderParams)}!`,
// The Edge bundle includes the server in its entrypoint, so it has to
// be in the SSR layer — we later convert the page request to the RSC layer
// via a webpack rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ const edgeSSRLoader: webpack.LoaderDefinitionFunction<EdgeSSRLoaderQuery> =

const buildInfo = getModuleBuildInfo(this._module as any)
buildInfo.nextEdgeSSR = {
// @ts-expect-error === 'true' is correct because loader options are serialized as searchParams. Type needs to be fixed somehow.
isServerComponent: isServerComponent === 'true',
isServerComponent,
page: page,
isAppDir,
}
Expand Down

0 comments on commit 66c1649

Please sign in to comment.