We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f27daf3 + 6d368cd commit 21cc108Copy full SHA for 21cc108
src/index.ts
@@ -1,10 +1,10 @@
1
import type * as Babel from "@babel/core";
2
import type { types as t, NodePath } from "@babel/core";
3
+import { createRequire } from "node:module";
4
import { ImportUtil, type Importer } from "babel-import-util";
5
import { globalId } from "./global-id.ts";
-
6
-// @ts-expect-error no upstream types
7
-import decoratorSyntax from "@babel/plugin-syntax-decorators";
+const req = createRequire(import.meta.url);
+const { default: decoratorSyntax } = req("@babel/plugin-syntax-decorators");
8
9
interface State extends Babel.PluginPass {
10
currentClassBodies: t.ClassBody[];
0 commit comments