Rollup reports an error, prompting you to turn off module conversion

I was testing the JavaScript script with Jest, using ES6 Modules, so I used babel to convert ESM to CommonJS, but prompted me to turn it off when Rollup was packaged. Now after opening it, you can"t run Rollup,. If you close it, you can"t run ESM in Jest. May I ask members how to solve the problem?

[!] (babel plugin) Error: It looks like your Babel configuration specifies a module transformer. Please disable it. See https://github.com/rollup/rol. for more information
Mar.11,2021

babel can be configured with env

"scripts": {
  "test": "cross-env BABEL_ENV='test' jest --watchAll --coverage",
  "prettier": "prettier --write --no-semi {.,test}/*.js",
  "build": "cross-env BABEL_ENV='production' rollup -c"
}
Menu