Skip to content

Commit

Permalink
test(profiling) format
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Nov 29, 2024
1 parent a473e0f commit a3a20d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/profiling-node/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import cjsModule from 'node:module';

const ESMRequireShim = `
const require = cjsModule.createRequire(import.meta.url);
`
`;

function makeESMImportShimPlugin(shim) {
return {
Expand All @@ -18,7 +18,7 @@ function makeESMImportShimPlugin(shim) {
};
}

function makeESMRequireShimPlugin(shim){
function makeESMRequireShimPlugin(shim) {
return {
transform(code) {
const SHIM_REGEXP = /\/\/ #START_SENTRY_ESM_REQUIRE_SHIM[\s\S]*?\/\/ #END_SENTRY_ESM_REQUIRE_SHIM/;
Expand All @@ -39,7 +39,7 @@ const variants = makeNPMConfigVariants(
for (const variant of variants) {
if (variant.output.format === 'esm') {
variant.plugins.push(makeESMImportShimPlugin(ESMImportShim));
variant.plugins.push(makeESMRequireShimPlugin(ESMRequireShim))
variant.plugins.push(makeESMRequireShimPlugin(ESMRequireShim));
} else {
// Remove the ESM shim comment
variant.plugins.push(makeESMImportShimPlugin(''));
Expand Down

0 comments on commit a3a20d1

Please sign in to comment.