0

I am trying to compile jsx with babel. I can do it but I want to set --out-file in a child dir. There is I want to do:

website
  src
    file_will_be_compiled.js
    file_was_compiled.js
  package.json

The script I am running on the shell :

babel --watch src/file_will_be_compiled.js --out-dir src --plugins @babel/plugin-transform-react-jsx
Yusuf Ziya
  • 107
  • 7

1 Answers1

0

Ok, I solved. The new shell code:

babel --watch src/file_will_be_compiled.js --out-file src/compiled_file.js --presets preset-react

Yusuf Ziya
  • 107
  • 7