Skip to content

Commit 2d2cbeb

Browse files
committed
fix: revert #27
This reverts commit 822b65e.
1 parent f836697 commit 2d2cbeb

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

src/index.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,6 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
5050
) {
5151
return undefined;
5252
}
53-
if (
54-
ts.isCallExpression(node) &&
55-
ts.isIdentifier(node.expression) &&
56-
node.expression.text === "require" &&
57-
ts.isStringLiteral(node.arguments[0]) &&
58-
node.arguments.length === 1
59-
) {
60-
const firstArg = node.arguments[0] as ts.StringLiteral;
61-
const file = bindModuleToFile(firstArg.text);
62-
if (!file) {
63-
return node;
64-
}
65-
const fileLiteral = ts.createLiteral(file);
66-
return ts.updateCall(node, node.expression, node.typeArguments, [
67-
fileLiteral
68-
]);
69-
}
7053
if (ts.isImportDeclaration(node)) {
7154
return unpathImportDeclaration(node);
7255
}

tests/__fixtures/core/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
const { sum, subs } = require("@utils");
2-
const { NoRuntimecodeHere } = require("@utils/types-only");
1+
export { sum } from "@utils";
32
export { NoRuntimecodeHere } from "@utils/types-only";
4-
import { NoRuntimecodeHere } from "@utils";
3+
import { subs, NoRuntimecodeHere } from "@utils";
54
import "@circular/b";
65
import { A } from "@circular/a";
76

0 commit comments

Comments
 (0)