Skip to content

Commit

Permalink
Avoid createRequire in @babel/standalone bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 16, 2022
1 parent 57b208c commit f6074d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/babel-preset-env/data/core-js-compat.js
@@ -0,0 +1 @@
module.exports = require("core-js-compat/data.json");
5 changes: 1 addition & 4 deletions packages/babel-preset-env/src/normalize-options.ts
@@ -1,15 +1,12 @@
import semver from "semver";
import type { SemVer } from "semver";
import corejs2Polyfills from "@babel/compat-data/corejs2-built-ins";
import corejs3Polyfills from "../data/core-js-compat";
import { plugins as pluginsList } from "./plugins-compat-data";
import moduleTransformations from "./module-transformations";
import { TopLevelOptions, ModulesOption, UseBuiltInsOption } from "./options";
import { OptionValidator } from "@babel/helper-validator-option";

import { createRequire } from "module";
const require = createRequire(import.meta.url);
const corejs3Polyfills = require("core-js-compat/data.json");

const corejs2DefaultWebIncludes = [
"web.timers",
"web.immediate",
Expand Down

0 comments on commit f6074d9

Please sign in to comment.