Skip to content

Commit

Permalink
Switch to import pattern to load instrumentation on Express tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed May 29, 2024
1 parent ce3c7c1 commit 0e2f73a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sideEffects": false,
"scripts": {
"build": "remix vite:build",
"dev": "NODE_OPTIONS='--import=./instrument.server.mjs' node ./server.mjs",
"dev": "node ./server.mjs",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "cross-env NODE_ENV=production node ./server.mjs",
"typecheck": "tsc",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './instrument.mjs';

import { createRequestHandler } from '@remix-run/express';
import { installGlobals } from '@remix-run/node';
import compression from 'compression';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "remix vite:build",
"dev": "node ./server.mjs",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "cross-env NODE_ENV=production node --require='./instrument.cjs' ./server.mjs",
"start": "cross-env NODE_ENV=production node ./server.mjs",
"typecheck": "tsc",
"clean": "npx rimraf node_modules pnpm-lock.yaml",
"test:build": "pnpm install && npx playwright install && pnpm build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './instrument.cjs';

import { createRequestHandler } from '@remix-run/express';
import { installGlobals } from '@remix-run/node';
import compression from 'compression';
Expand Down

0 comments on commit 0e2f73a

Please sign in to comment.