How can I compile a .jsx
file using the npx babel-cli [inpfile].jsx --out-file [outfile].js --plugin=@[someplugin]
command. I have tried --plugin=@plugin-transform-react-jsx
but it gives error on the very first JSX expression.
I have babel-cli, babel-core etc. packages installed.
I can use create-react-app
and everything works fine but I want to do this manually, compiling JSX.
Also if ES6 to ES5 conversion is possible with the same procedure; please state it also.
Any help would be appreciated.