Skip to content

Commit b055f9a

Browse files
committed
remove remix-development-tools
It keeps causing issues like this: #414 Closes #414
1 parent 74ee414 commit b055f9a

File tree

5 files changed

+7
-197
lines changed

5 files changed

+7
-197
lines changed

app/entry.client.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ if (ENV.MODE === 'production' && ENV.SENTRY_DSN) {
66
import('./utils/monitoring.client.tsx').then(({ init }) => init())
77
}
88

9-
const callback = () =>
10-
startTransition(() => {
11-
hydrateRoot(document, <RemixBrowser />)
12-
})
13-
14-
if (ENV.MODE === 'development') {
15-
import('remix-development-tools').then(({ initClient }) => {
16-
// Add all the dev tools props here into the client
17-
initClient()
18-
callback()
19-
})
20-
} else {
21-
callback()
22-
}
9+
startTransition(() => {
10+
hydrateRoot(document, <RemixBrowser />)
11+
})

app/entry.server.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,13 @@ export default async function handleRequest(...args: DocRequestArgs) {
4040
const nonce = String(loadContext.cspNonce) ?? undefined
4141
return new Promise(async (resolve, reject) => {
4242
let didError = false
43-
const context =
44-
process.env.NODE_ENV === 'development'
45-
? await import('remix-development-tools').then(({ initServer }) =>
46-
initServer(remixContext),
47-
)
48-
: remixContext
4943
// NOTE: this timing will only include things that are rendered in the shell
5044
// and will not include suspended components and deferred loaders
5145
const timings = makeTimings('render', 'renderToPipeableStream')
5246

5347
const { pipe, abort } = renderToPipeableStream(
5448
<NonceProvider value={nonce}>
55-
<RemixServer context={context} url={request.url} />
49+
<RemixServer context={remixContext} url={request.url} />
5650
</NonceProvider>,
5751
{
5852
[callbackName]: () => {

app/root.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ import { type Theme, setTheme, getTheme } from './utils/theme.server.ts'
5959
import { makeTimings, time } from './utils/timing.server.ts'
6060
import { getToast } from './utils/toast.server.ts'
6161
import { useOptionalUser, useUser } from './utils/user.ts'
62-
63-
const RemixDevTools =
64-
process.env.NODE_ENV === 'development'
65-
? lazy(() => import('remix-development-tools'))
66-
: null
6762

6863
export const links: LinksFunction = () => {
6964
return [
@@ -282,13 +277,8 @@ function App() {
282277
<ThemeSwitch userPreference={data.requestInfo.userPrefs.theme} />
283278
</div>
284279
</div>
285-
<Confetti id={data.confettiId} />
286-
<EpicToaster toast={data.toast} />
287-
{RemixDevTools ? (
288-
<Suspense>
289-
<RemixDevTools />
290-
</Suspense>
291-
) : null}
280+
<Confetti id={data.confettiId} />
281+
<EpicToaster toast={data.toast} />
292282
</Document>
293283
)
294284
}

package-lock.json

Lines changed: 0 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"react-dom": "^18.2.0",
9292
"remix-auth": "^3.5.1",
9393
"remix-auth-form": "^1.3.0",
94-
"remix-development-tools": "^2.1.1",
9594
"remix-auth-github": "^1.6.0",
9695
"remix-utils": "^6.6.0",
9796
"set-cookie-parser": "^2.6.0",
@@ -159,4 +158,4 @@
159158
"prisma": {
160159
"seed": "tsx prisma/seed.ts"
161160
}
162-
}
161+
}

0 commit comments

Comments
 (0)