How to compile all included files into one using Babel?

前端 未结 2 885
感动是毒
感动是毒 2021-02-07 11:43

I am using Babel in my project. The thing is, I have this line of code in my server.js:

import schema from \"./data/schema\";

(

2条回答
  •  一整个雨季
    2021-02-07 12:01

    You can use the following solution to compile all included files into one using Babel:

    npx babel src --out-file script-compiled.js
    

提交回复
热议问题