You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that require results in the object { default: { plugins: [...], presets: [...] } }; while previously (when the options file was CJS, exporting options like module.exports = { ... }) it would be just the options object { plugins: [...], presets: [...] }, so that breaks everything that depends on that helper. I believe, the same problem is present in other places where require, created viacreateRequire() is used.
P.S.: So, the actual way I bumped into it was attempting to migrate tests with @babel/helper-plugin-test-runner to full ESM version.
Here:
babel/packages/babel-helper-fixtures/src/index.ts
Line 483 in 57585c0
if the options file is an ESM module, i.e.
that require results in the object
{ default: { plugins: [...], presets: [...] } }; while previously (when the options file was CJS, exporting options likemodule.exports = { ... }) it would be just the options object{ plugins: [...], presets: [...] }, so that breaks everything that depends on that helper. I believe, the same problem is present in other places where require, created viacreateRequire()is used.P.S.: So, the actual way I bumped into it was attempting to migrate tests with
@babel/helper-plugin-test-runnerto full ESM version.