diff --git a/packages/babel-plugin-transform-runtime/scripts/build-dist.js b/packages/babel-plugin-transform-runtime/scripts/build-dist.js index 3e2e923a8e66..690260c1dfc5 100644 --- a/packages/babel-plugin-transform-runtime/scripts/build-dist.js +++ b/packages/babel-plugin-transform-runtime/scripts/build-dist.js @@ -9,7 +9,7 @@ const t = require("@babel/types"); const transformRuntime = require("../"); -const runtimeVersion = require("../../babel-runtime/package.json").version; +const runtimeVersion = require("@babel/runtime/package.json").version; const corejs3Definitions = require("../lib/runtime-corejs3-definitions").default(); function outputFile(filePath, data) { @@ -137,6 +137,7 @@ function writeHelperExports(runtimeName, helperSubExports) { const exports = { ...helperSubExports, "./regenerator": "./regenerator/index.js", + "./package.json": "./package.json", }; const pkgDirname = getRuntimeRoot(runtimeName); const pkgJsonPath = require.resolve(`${pkgDirname}/package.json`); diff --git a/packages/babel-runtime-corejs3/package.json b/packages/babel-runtime-corejs3/package.json index bf2d591c655a..bec15b13d66a 100644 --- a/packages/babel-runtime-corejs3/package.json +++ b/packages/babel-runtime-corejs3/package.json @@ -418,6 +418,7 @@ "default": "./helpers/wrapRegExp/index.mjs" }, "./regenerator": "./regenerator/index.js", + "./package.json": "./package.json", "./core-js-stable/": "./core-js-stable/", "./core-js-stable/map": "./core-js-stable/map.js", "./core-js-stable/promise": "./core-js-stable/promise.js", diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index 16b2c86d5bf3..0e7af75c3fef 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -417,6 +417,7 @@ "module": "./helpers/wrapRegExp/index.mjs", "default": "./helpers/wrapRegExp/index.mjs" }, - "./regenerator": "./regenerator/index.js" + "./regenerator": "./regenerator/index.js", + "./package.json": "./package.json" } }