Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove entry.server.spa.tsx implementation #11681

Merged
merged 1 commit into from
Jun 20, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/tall-mangos-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-router/dev": minor
---

Remove internal entry.server.spa.tsx implementation
4 changes: 1 addition & 3 deletions packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ export async function generateEntry(

let defaultEntryServer = path.resolve(
defaultsDirectory,
ctx?.reactRouterConfig.ssr === false
? `entry.server.spa.tsx`
: `entry.server.node.tsx`
`entry.server.node.tsx`
);

let isServerEntry = entry === "entry.server";
Expand Down
12 changes: 1 addition & 11 deletions packages/remix-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,17 +487,7 @@ export async function resolveEntryFiles({
let pkgJson = await PackageJson.load(rootDirectory);
let deps = pkgJson.content.dependencies ?? {};

if (!reactRouterConfig.ssr) {
// This is a super-simple default since we don't need streaming in SPA Mode.
// We can include this in a remix-spa template, but right now `npx remix reveal`
// will still expose the streaming template since that command doesn't have
// access to the `ssr:false` flag in the vite config (the streaming template
// works just fine so maybe instead of having this we _only have this version
// in the template...). We let users manage an entry.server file in SPA Mode
// so they can de ide if they want to hydrate the full document or just an
// embedded `<div id="app">` or whatever.
entryServerFile = "entry.server.spa.tsx";
} else if (userEntryServerFile) {
if (userEntryServerFile) {
entryServerFile = userEntryServerFile;
} else {
if (!deps["@react-router/node"]) {
Expand Down
73 changes: 0 additions & 73 deletions packages/remix-dev/config/defaults/entry.server.spa.tsx

This file was deleted.

Loading