Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: install source-map-support #472

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kentcdodds.com",
"version": "1.0.0",
"engines": {
"node": "18",
"node": "16",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this change. Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no that wasn't intentional, sorry

You can revert that if you want

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries :) Thanks!

"npm": "8"
},
"description": "A remix version of kentcdodds.com",
Expand Down Expand Up @@ -146,6 +146,7 @@
"remark-slug": "^7.0.1",
"request-ip": "^3.3.0",
"server-timing": "^3.3.3",
"source-map-support": "^0.5.21",
"spin-delay": "^1.2.0",
"tailwindcss": "^3.3.2",
"tiny-invariant": "^1.3.1",
Expand Down Expand Up @@ -183,6 +184,7 @@
"@types/react-dom": "^18.2.6",
"@types/react-table": "^7.7.14",
"@types/request-ip": "^0.0.38",
"@types/source-map-support": "^0.5.6",
"@types/uuid": "^9.0.2",
"@types/ws": "^8.5.5",
"autoprefixer": "^10.4.14",
Expand Down
10 changes: 9 additions & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import {createRequestHandler, type RequestHandler} from '@remix-run/express'
import {broadcastDevReady, type ServerBuild} from '@remix-run/node'
import {
broadcastDevReady,
installGlobals,
type ServerBuild,
} from '@remix-run/node'
import * as Sentry from '@sentry/node'
import address from 'address'
import chalk from 'chalk'
Expand All @@ -16,6 +20,7 @@ import morgan from 'morgan'
import onFinished from 'on-finished'
import path from 'path'
import serverTiming from 'server-timing'
import sourceMapSupport from 'source-map-support'
import {fileURLToPath} from 'url'
import {type WebSocketServer} from 'ws'
import {getInstanceInfo} from '../app/utils/cjs/litefs-js.js'
Expand All @@ -34,6 +39,9 @@ import {
// definitely exist by the time the dev or prod server actually runs.
import * as remixBuild from '../build/index.js'

sourceMapSupport.install()
installGlobals()

const BUILD_PATH = '../build/index.js'

const build = remixBuild as unknown as ServerBuild
Expand Down