先贴地址
babel 在 es6 的解析器中胜出,那么对它的支持不容忽视,可,在 FIS 中这个事情变得尤为简单,写一个插件,做个配置就能搞定。
上面附上了 GitHub 地址,请观赏。
其他说明:模块化框架选择的是 https://github.com/fex-team/mod
先贴地址
babel 在 es6 的解析器中胜出,那么对它的支持不容忽视,可,在 FIS 中这个事情变得尤为简单,写一个插件,做个配置就能搞定。
上面附上了 GitHub 地址,请观赏。
其他说明:模块化框架选择的是 https://github.com/fex-team/mod
如何让 fis3 支持 Object rest spread 运算符呢?
fis.config.set('project.fileType.text', 'es');
fis.config.set('modules.parser.es', 'babel-5.x');
fis.config.set('roadmap.ext.es', 'js');
fis.config.set('settings.parser.babel-5.x', {
blacklist: ['regenerator'],
optional: ['asyncToGenerator'],
sourceMaps: false,
stage: 3,
plugins: ["transform-object-rest-spread"] // 这个是 babel 的 plugin
});