Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/router-plugin/src/core/code-splitter/compilers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export function compileCodeSplitReferenceRoute(
) {
programPath.unshiftContainer('body', [
template.statement(
`const ${splitNodeMeta.localImporterIdent} = () => import('${splitUrl}')`,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should not be changed in this PR

`const ${splitNodeMeta.localImporterIdent} = () => import('${splitUrl.replace(/'/g, "\\'")}')`,
)(),
])
}
Expand Down Expand Up @@ -719,7 +719,7 @@ export function compileCodeSplitReferenceRoute(
) {
programPath.unshiftContainer('body', [
template.statement(
`const ${splitNodeMeta.localImporterIdent} = () => import('${splitUrl}')`,
`const ${splitNodeMeta.localImporterIdent} = () => import('${splitUrl.replace(/'/g, "\\'")}')`,
)(),
])
}
Expand Down
2 changes: 1 addition & 1 deletion packages/start-server-core/src/createStartHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export function createStartHandler<TRegister = Register>(
return normalizeSsrResponse(
Response.json(
{ error: 'Only HTML requests are supported here' },
{ status: 500 },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add an e2e test

{ status: 406 },
),
)
}
Expand Down