You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 369 B

3 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. # babel-plugin-syntax-jsx
  2. ## Installation
  3. ```sh
  4. $ npm install babel-plugin-syntax-jsx
  5. ```
  6. ## Usage
  7. ### Via `.babelrc` (Recommended)
  8. **.babelrc**
  9. ```json
  10. {
  11. "plugins": ["syntax-jsx"]
  12. }
  13. ```
  14. ### Via CLI
  15. ```sh
  16. $ babel --plugins syntax-jsx script.js
  17. ```
  18. ### Via Node API
  19. ```javascript
  20. require("babel-core").transform("code", {
  21. plugins: ["syntax-jsx"]
  22. });
  23. ```