The require hook will bind itself to node's require and automatically compile files on the fly.
$ npm install babel-register
require("babel-register");
All subsequent files required by node with the extensions .es6
, .es
, .jsx
and .js
will be transformed by Babel.
See documentation for details.