How to use ECMAScript6 modules within webpages

后端 未结 4 942
臣服心动
臣服心动 2020-12-08 07:11

I\'m pretty excited about using ECMAScript 6 features now via Babeljs - in particular, I\'d love to start making my JavaScript code more modular using the new modules featur

4条回答
  •  盖世英雄少女心
    2020-12-08 07:43

    Would one of the --modules switches compile into JS that can be directly included in a web page in the same way that the --script flag will compile to browser JS (--script can not be used with modules)? See https://github.com/google/traceur-compiler/wiki/Options-for-Compiling

提交回复
热议问题