reactjswebpackyarn-v2babel-cli

Babel skip logging the transpiled script to console


yarn run babel -f babel.config.js 

is logging all the transpiled scripts to the console by default.

Is there an option in Babel to skip logging the transpiled javascript to Console?


Solution

  • If you need to prevent babel logging thing, you need to set up the --out-file and set --quiet option:

    // yarn
    yarn babel input.js --out-file output.js --quiet
    // or with npx
    npx babel input.js --out-file output.js --quiet