Run tests in a native Node.js ESM environment (#13966)
This commit is contained in:
11
packages/babel-helper-plugin-test-runner/esm.mjs
Normal file
11
packages/babel-helper-plugin-test-runner/esm.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import _cjs from "./lib/index.js";
|
||||
|
||||
const adapter = _cjs.default.bind();
|
||||
|
||||
// For backward compatibility with the CJS-only version, this makes
|
||||
// import _x from "@babel/helper-plugin-test-runner"
|
||||
// const x = _x.default
|
||||
// still work.
|
||||
adapter.default = _cjs.default;
|
||||
|
||||
export default adapter;
|
||||
@@ -13,6 +13,20 @@
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"import": "./esm.mjs",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./lib/index.js"
|
||||
],
|
||||
"./lib": "./lib/index.js",
|
||||
"./lib/index": "./lib/index.js",
|
||||
"./lib/index.js": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-transform-fixture-test-runner": "workspace:^"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user