Files
babel/packages/babel-parser/index.cjs
Nicolò RibaudoandGitHub 7931199e00 Prepare for compiling Babel to native ESM (#13414)
* Move dynamic import in `@babel/core` to a CJS file

* Allow compiling to ESM

* Add `USE_ESM` compile-time flag

* Fix `@babel/eslint-parser`

* Provide CJS bundle of `@babel/parser`

* Minor test fixes

* Add CommonJS proxy to `@babel/core` for backward compat

* Test ESM on CI

* TODO: skip failing packages

* Add missing `devDependency` to `@babel/helper-remap-async-to-generator`

* Update contributing.md

* Apply suggestions from self-review

* Update Gulpfile.mjs

* Prettier

* Explicitly use node in makefile
2022-07-11 16:43:59 +02:00

6 lines
111 B
JavaScript

try {
module.exports = require("./lib/index.cjs");
} catch {
module.exports = require("./lib/index.js");
}