Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cli pipe not working #6758
When piping into babel the script is not compiled.
When using the cli it works as expected when not piping in the file.
Working when referencing a file:
$ npx babel ./try_babel.js 'use strict'; var a = 'hi';
I would expect all commands
$ npx babel ./try_babel.js $ cat try_babel.js | npx babel $ npx babel < ./try_babel.js
to do the same thing
Does not work when piped in:
$ cat try_babel.js | npx babel const a = 'hi'; $ # nor with "<" like docs from https://babeljs.io/docs/usage/cli/#babel-piping-files $ npx babel < ./try_babel.js const a = 'hi';
File to compile (try_babel.js)
const a = 'hi'
Trying to pipe output of browserify into babel for some quick tests.
Hey @BebeSparkelSparkel! We really appreciate you taking the time to report an issue. The collaborators
I've faced similar issue with @babel/cli version 7.0.0-beta.37:
This is by design: if Babel doesn't know where the file comes from, it can't choose the correct
You can make it work in three ways:
I have opened babel/website#1512 to update the documentation.