We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

この翻訳は不完全です。英語から この記事を翻訳 してください。


Using advanced JavaScript features from ECMAScript 6 and 7



provides transformations for the vast majority of ES6 features, and enables them by default.

Since Firefox already fully supports most of these, it's best to configure Babel to ignore them.


  "env": {
    "firefox": {
      "sourceMaps": "inline",
      "blacklist": [

Then, to compile an individual script, simply run:

BABEL_ENV=firefox babel <filename>

Or, to compile every JavaScript file under the directory src and place the compiled files in compiled, copying over non-JavaScript files in the process, run:

BABEL_ENV=firefox babel -Dd compiled src


このページの貢献者: lv7777
最終更新者: lv7777,