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 613db9a commit 7ebc905Copy full SHA for 7ebc905
1 file changed
packages/babel-standalone/test/built-into-es5.js
@@ -1,5 +1,3 @@
1
-import { createRequire } from "module";
2
-const require = createRequire(import.meta.url);
3
import fs from "fs";
4
import { parse as acornParse } from "acorn";
5
import { itGte } from "$repo-utils";
@@ -8,9 +6,12 @@ describe("@babel/standalone", () => {
8
6
let babelStandaloneSource;
9
7
10
beforeAll(() => {
11
- babelStandaloneSource = fs.readFileSync(require.resolve("../babel.js"), {
12
- encoding: "utf8",
13
- });
+ babelStandaloneSource = fs.readFileSync(
+ new URL("../babel.js", import.meta.url),
+ {
+ encoding: "utf8",
+ },
14
+ );
15
});
16
17
it("should be built into ES5", () => {
0 commit comments