Skip to content

Commit 4026445

Browse files
author
Luca Forstner
committed
maybe
1 parent 18f044a commit 4026445

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

dev-packages/e2e-tests/test-applications/node-profiling/build-cjs.mjs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
// only runs integration and unit tests, this change would be missed and could end up in a release.
55
// Therefor, once all binaries are precompiled in CI and tests pass, run esbuild with bundle:true
66
// which will copy all binaries to the outfile folder and throw if any of them are missing.
7-
import esbuild from 'esbuild';
7+
import esbuild from "esbuild";
88

9-
console.log('Running build using esbuild version', esbuild.version);
9+
console.log("Running build using esbuild version", esbuild.version);
1010

1111
esbuild.buildSync({
12-
platform: 'node',
13-
entryPoints: ['./index.ts'],
14-
outfile: './dist/cjs/index.cjs',
15-
target: 'esnext',
16-
format: 'cjs',
17-
bundle: true,
18-
loader: { '.node': 'copy' },
12+
platform: "node",
13+
entryPoints: ["./index.ts"],
14+
outfile: "./dist/cjs/index.js",
15+
target: "esnext",
16+
format: "cjs",
17+
bundle: true,
18+
loader: { ".node": "copy" },
19+
external: ["@sentry/node", "@sentry/profiling-node"],
1920
});

dev-packages/e2e-tests/test-applications/node-profiling/build-esm.mjs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
// only runs integration and unit tests, this change would be missed and could end up in a release.
55
// Therefor, once all binaries are precompiled in CI and tests pass, run esbuild with bundle:true
66
// which will copy all binaries to the outfile folder and throw if any of them are missing.
7-
import esbuild from 'esbuild';
7+
import esbuild from "esbuild";
88

9-
console.log('Running build using esbuild version', esbuild.version);
9+
console.log("Running build using esbuild version", esbuild.version);
1010

1111
esbuild.buildSync({
12-
platform: 'node',
13-
entryPoints: ['./index.ts'],
14-
outfile: './dist/esm/index.mjs',
15-
target: 'esnext',
16-
format: 'esm',
17-
bundle: true,
18-
loader: { '.node': 'copy' },
12+
platform: "node",
13+
entryPoints: ["./index.ts"],
14+
outfile: "./dist/esm/index.mjs",
15+
target: "esnext",
16+
format: "esm",
17+
bundle: true,
18+
loader: { ".node": "copy" },
19+
external: ["@sentry/node", "@sentry/profiling-node"],
1920
});

dev-packages/e2e-tests/test-applications/node-profiling/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"typecheck": "tsc --noEmit",
77
"build": "node build-cjs.mjs && node build-esm.mjs",
8-
"test": "node dist/cjs/index.cjs && node --experimental-require-module dist/cjs/index.cjs && node dist/esm/index.mjs",
8+
"test": "node dist/cjs/index.js && node --experimental-require-module dist/cjs/index.js && node dist/esm/index.mjs",
99
"clean": "npx rimraf node_modules dist",
1010
"test:electron": "$(pnpm bin)/electron-rebuild && playwright test",
1111
"test:build": "pnpm run typecheck && pnpm run build",

0 commit comments

Comments
 (0)