From 8e782bd1c2ae892f741a204ed60e28bc49ee2525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 1 Aug 2023 19:26:35 +0200 Subject: [PATCH] chore: install `source-map-support` --- package-lock.json | 20 ++++++++++++++++++++ package.json | 2 ++ server/index.ts | 11 ++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 5d764f66..9a415d65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,7 @@ "remix-auth": "^3.5.0", "remix-auth-form": "^1.3.0", "remix-utils": "^6.6.0", + "source-map-support": "^0.5.21", "spin-delay": "^1.2.0", "tailwind-merge": "^1.13.2", "tailwindcss": "^3.3.2", @@ -87,6 +88,7 @@ "@types/qrcode": "^1.5.1", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", + "@types/source-map-support": "^0.5.6", "@types/testing-library__jest-dom": "^5.14.7", "@vitejs/plugin-react": "^4.0.3", "@vitest/coverage-v8": "^0.33.0", @@ -6107,6 +6109,24 @@ "@types/node": "*" } }, + "node_modules/@types/source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==", + "dev": true, + "dependencies": { + "source-map": "^0.6.0" + } + }, + "node_modules/@types/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", diff --git a/package.json b/package.json index 88e6f3d2..594105cb 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "remix-auth": "^3.5.0", "remix-auth-form": "^1.3.0", "remix-utils": "^6.6.0", + "source-map-support": "^0.5.21", "spin-delay": "^1.2.0", "tailwind-merge": "^1.13.2", "tailwindcss": "^3.3.2", @@ -117,6 +118,7 @@ "@types/qrcode": "^1.5.1", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", + "@types/source-map-support": "^0.5.6", "@types/testing-library__jest-dom": "^5.14.7", "@vitejs/plugin-react": "^4.0.3", "@vitest/coverage-v8": "^0.33.0", diff --git a/server/index.ts b/server/index.ts index 23c00388..f63f3c6f 100644 --- a/server/index.ts +++ b/server/index.ts @@ -13,13 +13,22 @@ import { createRequestHandler as _createRequestHandler, } from '@remix-run/express' import { wrapExpressCreateRequestHandler } from '@sentry/remix' -import { type ServerBuild, broadcastDevReady } from '@remix-run/node' +import { + type ServerBuild, + broadcastDevReady, + installGlobals +} from '@remix-run/node' import getPort, { portNumbers } from 'get-port' import chalk from 'chalk' +import sourceMapSupport from 'source-map-support' // @ts-ignore - this file may not exist if you haven't built yet, but it will // definitely exist by the time the dev or prod server actually runs. import * as remixBuild from '../build/index.js' + +sourceMapSupport.install() +installGlobals() + const MODE = process.env.NODE_ENV const createRequestHandler = wrapExpressCreateRequestHandler(