diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts b/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts index f0c77f67..8d6feca8 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts @@ -56,13 +56,13 @@ describeNode18Plus("vite 6 bundle", () => { }); describeNode18Plus("webpack 5 bundle", () => { - const viteRoot = path.join(__dirname, "input", "webpack5"); + const webpackRoot = path.join(__dirname, "input", "webpack5"); const tempDir = createTempDir(); beforeEach(() => { - execSync("yarn install", { cwd: viteRoot, stdio: "inherit" }); + execSync("yarn install", { cwd: webpackRoot, stdio: "inherit" }); execSync("yarn webpack build", { - cwd: viteRoot, + cwd: webpackRoot, stdio: "inherit", env: { ...process.env, SENTRY_TEST_OVERRIDE_TEMP_DIR: tempDir }, }); @@ -81,13 +81,13 @@ describeNode18Plus("webpack 5 bundle", () => { }); describeNode18Plus("rollup bundle", () => { - const viteRoot = path.join(__dirname, "input", "rollup4"); + const rollupRoot = path.join(__dirname, "input", "rollup4"); const tempDir = createTempDir(); beforeEach(() => { - execSync("yarn install", { cwd: viteRoot, stdio: "inherit" }); + execSync("yarn install", { cwd: rollupRoot, stdio: "inherit" }); execSync("yarn rollup --config rollup.config.js", { - cwd: viteRoot, + cwd: rollupRoot, stdio: "inherit", env: { ...process.env, SENTRY_TEST_OVERRIDE_TEMP_DIR: tempDir }, }); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 2a43368b..1a528566 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,8 +1,9 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; -import { join } from "path"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; -const __dirname = new URL(".", import.meta.url).pathname; +const __dirname = dirname(fileURLToPath(import.meta.url)); export default defineConfig({ input: { index: join(__dirname, "..", "bundle.js") }, diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js index 0d763cdb..bb319442 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js @@ -1,6 +1,9 @@ import { defineConfig } from "vite"; import { sentryVitePlugin } from "@sentry/vite-plugin"; -import { join } from "path"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); export default defineConfig({ clearScreen: false, diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index fa294910..ae1d0882 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,7 +1,8 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; -import { join } from "path"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; -const __dirname = new URL(".", import.meta.url).pathname; +const __dirname = dirname(fileURLToPath(import.meta.url)); export default { devtool: "source-map-debugids",