Skip to content

Commit 33a3b0b

Browse files
authored
RSC: Default entry.server and more standard App.tsx (#9655)
1 parent 3f6e7c1 commit 33a3b0b

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

packages/cli/src/commands/experimental/setupRscHandler.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ export const handler = async ({ force, verbose }) => {
251251
indexHtml = indexHtml.replace(
252252
'href="/favicon.png" />',
253253
'href="/favicon.png" />\n' +
254-
' <link rel="stylesheet" href="index.css" />\n' +
255254
' <script type="module" src="entry.client.tsx"></script>'
256255
)
257256

@@ -290,18 +289,6 @@ export const handler = async ({ force, verbose }) => {
290289
})
291290
},
292291
},
293-
{
294-
title: 'Updating entry.server.tsx...',
295-
task: async () => {
296-
let entryServer = fs.readFileSync(rwPaths.web.entryServer, 'utf-8')
297-
298-
entryServer = entryServer.replaceAll('App', 'HomePage')
299-
300-
writeFile(rwPaths.web.entryServer, entryServer, {
301-
overwriteExisting: true,
302-
})
303-
},
304-
},
305292
{
306293
title: 'Add React experimental types',
307294
task: async () => {

packages/cli/src/commands/experimental/templates/rsc/App.tsx.template

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { FatalErrorBoundary } from '@redwoodjs/web'
1+
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
22

33
import FatalErrorPage from './pages/FatalErrorPage/FatalErrorPage'
44
import Routes from './Routes'
55

6+
import './index.css'
7+
68
const App = () => (
79
<FatalErrorBoundary page={FatalErrorPage}>
8-
<Routes />
10+
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
11+
<Routes />
12+
</RedwoodProvider>
913
</FatalErrorBoundary>
1014
)
1115

0 commit comments

Comments
 (0)