4

How do you pass options to the env preset when using babel-node through the command line? I've looked through the docs but was unable to find how to configure the babel-node env preset.

What I'm trying to target the current version of node installed on my machine. The equivalent with a .babelrc file would be

{
  "presets": [
    ["env", {
      "targets": {
        "node": "current"
      }
    }]
  ]
}

Thanks!

1 Answer 1

0

You can use inline --presets flag.

For Example:

  babel-node index.js --presets=env
1
  • 1
    and how do you configure the env preset?
    – aryzing
    Jun 27, 2018 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.