npm install @treblefm/babel-nodebabel-node, meant for production use.Uses babel-preset-env to automatically select the minimum amount of
plugins, transforms, and polyfills (Stage 3 or better) required for your version of Node.js (>= 4). Also includesflow support; remember, kids, use protection and be type-safe.
sh
npm install @treblefm/babel-node
`$3
Instead of calling node in your npm start script (or wherever), call babel-node.$3
- Does not include REPL support
- Conflicts with babel-node provided by babel-cli$3
If you're also using @treblefm/eslint-config, you'll want to disable the
node/no-unsupported-features rule:`json
{
"extends": "@treblefm",
"rules": {
"node/no-unsupported-features": 0
}
}
``