Skip to content

Commit

Permalink
Remove entry.server.spa.tsx implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jun 18, 2024
1 parent 2d34a7e commit 68341ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 87 deletions.
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.

0 comments on commit 68341ba

Please sign in to comment.