Skip to content

Commit 615ea42

Browse files
committed
remove remix dev tools (temporarily)
1 parent 84c3c84 commit 615ea42

File tree

5 files changed

+6
-161
lines changed

5 files changed

+6
-161
lines changed

app/entry.client.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ if (ENV.MODE === 'development') {
88
if (ENV.MODE === 'production' && ENV.SENTRY_DSN) {
99
import('~/utils/monitoring.client.tsx').then(({ init }) => init())
1010
}
11-
if (process.env.NODE_ENV === 'development') {
12-
import('remix-development-tools').then(({ initRouteBoundariesClient }) => {
13-
initRouteBoundariesClient()
14-
startTransition(() => {
15-
hydrateRoot(document, <RemixBrowser />)
16-
})
17-
})
18-
} else {
19-
startTransition(() => {
20-
hydrateRoot(document, <RemixBrowser />)
21-
})
22-
}
11+
12+
startTransition(() => {
13+
hydrateRoot(document, <RemixBrowser />)
14+
})

app/entry.server.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ export default async function handleRequest(...args: DocRequestArgs) {
2727
remixContext,
2828
loadContext,
2929
] = args
30-
const context =
31-
process.env.NODE_ENV === 'development'
32-
? await import('remix-development-tools').then(
33-
({ initRouteBoundariesServer }) =>
34-
initRouteBoundariesServer(remixContext),
35-
)
36-
: remixContext
3730
const { currentInstance, primaryInstance } = await getInstanceInfo()
3831
responseHeaders.set('fly-region', process.env.FLY_REGION ?? 'unknown')
3932
responseHeaders.set('fly-app', process.env.FLY_APP_NAME ?? 'unknown')
@@ -54,7 +47,7 @@ export default async function handleRequest(...args: DocRequestArgs) {
5447

5548
const { pipe, abort } = renderToPipeableStream(
5649
<NonceProvider value={nonce}>
57-
<RemixServer context={context} url={request.url} />
50+
<RemixServer context={remixContext} url={request.url} />
5851
</NonceProvider>,
5952
{
6053
[callbackName]: () => {

app/root.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
useSubmit,
2121
} from '@remix-run/react'
2222
import { withSentry } from '@sentry/remix'
23-
import { Suspense, lazy, useRef } from 'react'
23+
import { useRef } from 'react'
2424
import { Confetti } from './components/confetti.tsx'
2525
import { GeneralErrorBoundary } from './components/error-boundary.tsx'
2626
import { SearchBar } from './components/search-bar.tsx'
@@ -48,11 +48,6 @@ import { useNonce } from './utils/nonce-provider.ts'
4848
import { makeTimings, time } from './utils/timing.server.ts'
4949
import { useToast } from './utils/useToast.tsx'
5050
import { useOptionalUser, useUser } from './utils/user.ts'
51-
import rdtStylesheetUrl from 'remix-development-tools/stylesheet.css'
52-
const RemixDevTools =
53-
process.env.NODE_ENV === 'development'
54-
? lazy(() => import('remix-development-tools'))
55-
: undefined
5651

5752
export const links: LinksFunction = () => {
5853
return [
@@ -62,9 +57,6 @@ export const links: LinksFunction = () => {
6257
{ rel: 'preload', href: fontStylestylesheetUrl, as: 'style' },
6358
{ rel: 'preload', href: tailwindStylesheetUrl, as: 'style' },
6459
cssBundleHref ? { rel: 'preload', href: cssBundleHref, as: 'style' } : null,
65-
rdtStylesheetUrl && process.env.NODE_ENV === 'development'
66-
? { rel: 'preload', href: rdtStylesheetUrl, as: 'style' }
67-
: null,
6860
{ rel: 'mask-icon', href: '/favicons/mask-icon.svg' },
6961
{
7062
rel: 'alternate icon',
@@ -82,9 +74,6 @@ export const links: LinksFunction = () => {
8274
{ rel: 'stylesheet', href: fontStylestylesheetUrl },
8375
{ rel: 'stylesheet', href: tailwindStylesheetUrl },
8476
cssBundleHref ? { rel: 'stylesheet', href: cssBundleHref } : null,
85-
rdtStylesheetUrl && process.env.NODE_ENV === 'development'
86-
? { rel: 'stylesheet', href: rdtStylesheetUrl }
87-
: null,
8877
].filter(Boolean)
8978
}
9079

@@ -236,11 +225,6 @@ function App() {
236225
</div>
237226
<Confetti confetti={data.flash?.confetti} />
238227
<Toaster />
239-
{RemixDevTools && (
240-
<Suspense>
241-
<RemixDevTools />
242-
</Suspense>
243-
)}
244228
</Document>
245229
)
246230
}

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@
137137
"prettier": "^2.8.8",
138138
"prettier-plugin-sql": "^0.15.1",
139139
"prettier-plugin-tailwindcss": "^0.3.0",
140-
"remix-development-tools": "^1.4.0",
141140
"remix-flat-routes": "^0.5.10",
142141
"tsconfig-paths": "^4.2.0",
143142
"tsx": "^3.12.7",

0 commit comments

Comments
 (0)