Skip to content

Commit

Permalink
RSC: Default entry.server and more standard App.tsx (#9655)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Dec 8, 2023
1 parent 3f6e7c1 commit 33a3b0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
13 changes: 0 additions & 13 deletions packages/cli/src/commands/experimental/setupRscHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ export const handler = async ({ force, verbose }) => {
indexHtml = indexHtml.replace(
'href="/favicon.png" />',
'href="/favicon.png" />\n' +
' <link rel="stylesheet" href="index.css" />\n' +
' <script type="module" src="entry.client.tsx"></script>'
)

Expand Down Expand Up @@ -290,18 +289,6 @@ export const handler = async ({ force, verbose }) => {
})
},
},
{
title: 'Updating entry.server.tsx...',
task: async () => {
let entryServer = fs.readFileSync(rwPaths.web.entryServer, 'utf-8')

entryServer = entryServer.replaceAll('App', 'HomePage')

writeFile(rwPaths.web.entryServer, entryServer, {
overwriteExisting: true,
})
},
},
{
title: 'Add React experimental types',
task: async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { FatalErrorBoundary } from '@redwoodjs/web'
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'

import FatalErrorPage from './pages/FatalErrorPage/FatalErrorPage'
import Routes from './Routes'

import './index.css'

const App = () => (
<FatalErrorBoundary page={FatalErrorPage}>
<Routes />
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<Routes />
</RedwoodProvider>
</FatalErrorBoundary>
)

Expand Down

0 comments on commit 33a3b0b

Please sign in to comment.