Skip to content

Commit 48b6aba

Browse files
committed
Fix async
1 parent ca27d75 commit 48b6aba

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

packages/rollup-plugin/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
CodeInjection,
1616
} from "@sentry/bundler-plugin-core";
1717
import MagicString, { SourceMap } from "magic-string";
18-
import type { TransformHook } from "rollup";
18+
import type { TransformResult } from "rollup";
1919
import * as path from "node:path";
2020
import { createRequire } from "node:module";
2121

@@ -125,14 +125,12 @@ export function _rollupPluginInternal(
125125
});
126126
}
127127

128-
function transform(code: string, id: string): ReturnType<TransformHook> {
128+
async function transform(code: string, id: string): Promise<TransformResult> {
129129
// Component annotations are only in user code and boolean flag replacements are
130130
// only in Sentry code. If we successfully add annotations, we can return early.
131131

132132
if (transformAnnotations?.transform) {
133-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
134-
// @ts-ignore TS complains about 'this'
135-
const result = transformAnnotations.transform(code, id);
133+
const result = await transformAnnotations.transform(code, id);
136134
if (result) {
137135
return result;
138136
}

0 commit comments

Comments
 (0)