Babel
https://babeljs.io/
Babel is a JavaScript compiler
Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. Here are the main things Babel can do for you:
Transform syntax
Polyfill features that are missing in your target environment (through a third-party polyfill such as core-js)
Source code transformations (codemods)
And more!
babel のトランスパイル例
code:js
// Babel Input: ES2015 arrow function
1, 2, 3.map(n => n + 1);
// Babel Output: ES5 equivalent
1, 2, 3.map(function(n) {
return n + 1;
});
Babelの手ほどき | 前編 Babelとは | CodeGrid
次世代のJavaScriptの標準機能を、ブラウザのサポートを待たずに使えるようにするNode.js製のツールです。次世代の標準機能を使って書かれたコードを、それらの機能をサポートしていないブラウザでも動くコードに変換(トランスパイル)します。
「次世代のJavaScriptの標準機能」というのはECMAScript(以降、ESと呼びます)のバージョン6や7で追加された(る)機能、そしてさらにその先の標準機能です。
ES6などで追加された構文を書いたら、それがサポートされてないブラウザでも動くようにコード変換してくれるライブラリっぽい
UnityでいうIL2CPPに似たイメージのソフトかなぁ。
Nuxt.jsのビルドオプション
Nuxt - build プロパティ