Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
Babel command line all jsx files in a directory, output as js files

I have been running a command to turn .jsx files into .js files one at a time:

npx babel App.jsx --out-file App.js --plugins=@babel/plugin-transform-react-jsx

I want to do it for everything in a directory. I read through the help command's options and it seems like I should be able to do this

npx babel -d mydirectory -x .jsx  --plugins=@babel/plugin-transform-react-jsx

But that says it requires filenames, despite providing a directory.

What's the right syntax to get this to work?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

According to babel docs, it appears the syntax is

npx babel mydirectory --out-dir dist -x .jsx  --plugins=@babel/plugin-transform-react-jsx

https://babeljs.io/docs/en/babel-cli#compile-directories

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!