How convert .jsx to .js with Gulp and Babel?

前端 未结 5 1042
余生分开走
余生分开走 2021-01-01 16:38

I need to convert all /src/.jsx files to /src/.js

Before I used gulp-react:

var react = require(\'gulp-react\');

gulp.task(\'jsx\', functio         


        
5条回答
  •  余生分开走
    2021-01-01 16:47

    Yeah using gulp with the package gulp-babel would do the trick.
    https://github.com/babel/gulp-babel

提交回复
热议问题