Is Babel a compiler or transpiler?

后端 未结 3 1410
悲哀的现实
悲哀的现实 2020-12-09 07:53

I\'ve been using Babel for a while now, and I\'ve always been under the impression that Babel was a transpiler for converting my ES6 and ES7 JavaScript into ES5 Jav

3条回答
  •  孤街浪徒
    2020-12-09 08:12

    Transpilers, or source-to-source compilers, are tools that read source code written in one programming language, and produce the equivalent code in another language.

    Babel is both a transpiler and compiler as the words can be used interchangeably.

提交回复
热议问题