Skip to content

Commit

Permalink
idk fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Dec 12, 2024
1 parent fb2fbd3 commit 5aa22a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/profiling-node/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const require = createRequire(import.meta.url);
`;

const ESMDirnameShim = `
const filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const __dirname = dirname(fileURLToPath(import.meta.url));
`;

function makeESMImportShimPlugin(shim) {
Expand Down
5 changes: 2 additions & 3 deletions packages/profiling-node/src/cpu_profiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
}

// #START_SENTRY_ESM_DIRNAME_SHIM
// const filename = fileURLToPath(import.meta.url);
// const __dirname = dirname(filename);
// const __dirname = dirname(fileURLToPath(import.meta.url));
// #END_SENTRY_ESM_DIRNAME_SHIM
const built_from_source_path = resolve(__dirname, '..', `./sentry_cpu_profiler-${identifier}`);
const built_from_source_path = resolve(__dirname, '..', `sentry_cpu_profiler-${identifier}`);
return require(`${built_from_source_path}.node`);
}

Expand Down

0 comments on commit 5aa22a2

Please sign in to comment.