How to compile JSX with Babel

How to compile JSX with Babel

Repeatable Babel build scripts in package.json compile JavaScript and JSX from src to lib, support watch mode, exclude generated files from version control, chain bundlers after compilation, and enable source maps for debugging.