Skip to content

Commit 0e2f73a

Browse files
committed
Switch to import pattern to load instrumentation on Express tests
1 parent ce3c7c1 commit 0e2f73a

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sideEffects": false,
44
"scripts": {
55
"build": "remix vite:build",
6-
"dev": "NODE_OPTIONS='--import=./instrument.server.mjs' node ./server.mjs",
6+
"dev": "node ./server.mjs",
77
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
88
"start": "cross-env NODE_ENV=production node ./server.mjs",
99
"typecheck": "tsc",

dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/server.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import './instrument.mjs';
2+
13
import { createRequestHandler } from '@remix-run/express';
24
import { installGlobals } from '@remix-run/node';
35
import compression from 'compression';

dev-packages/e2e-tests/test-applications/create-remix-app-express/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "remix vite:build",
77
"dev": "node ./server.mjs",
88
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
9-
"start": "cross-env NODE_ENV=production node --require='./instrument.cjs' ./server.mjs",
9+
"start": "cross-env NODE_ENV=production node ./server.mjs",
1010
"typecheck": "tsc",
1111
"clean": "npx rimraf node_modules pnpm-lock.yaml",
1212
"test:build": "pnpm install && npx playwright install && pnpm build",

dev-packages/e2e-tests/test-applications/create-remix-app-express/server.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import './instrument.cjs';
2+
13
import { createRequestHandler } from '@remix-run/express';
24
import { installGlobals } from '@remix-run/node';
35
import compression from 'compression';

0 commit comments

Comments
 (0)