We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf22508 commit a5b0c07Copy full SHA for a5b0c07
src/index.ts
@@ -1,10 +1,12 @@
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 } from "babel-import-util";
5
import { globalId } from "./global-id.ts";
6
-const req = createRequire(import.meta.url);
7
-const { default: decoratorSyntax } = req("@babel/plugin-syntax-decorators");
+
+// @ts-expect-error no upstream types
+import PluginSyntaxDecorators from "@babel/plugin-syntax-decorators";
8
+const decoratorSyntax =
9
+ PluginSyntaxDecorators.default || PluginSyntaxDecorators;
10
11
interface State extends Babel.PluginPass {
12
currentClassBodies: t.ClassBody[];
0 commit comments