mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* [babel 8] Remove unnecessary CJS ESM wrapper * Use latest Node.js for e2e test * Add snapshot to test
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
/*
|
|
* This test throws an error, because the plugin accesses
|
|
* @babel/core's CJS .types export before that the ESM
|
|
* version is loaded.
|
|
*/
|
|
|
|
const babel = require("../../../lib/index.js");
|
|
|
|
babel
|
|
.transformAsync("REPLACE_ME;", {
|
|
configFile: false,
|
|
plugins: [require("./plugins/eager.cjs")],
|
|
})
|
|
.then(out => console.log(out.code), console.error);
|