JoYous-SUN

Results 60 comments of JoYous-SUN

据说 *requestAnimationFrame* 不算是 macro task。 https://stackoverflow.com/questions/43050448/when-will-requestanimationframe-be-executed

@thelongmarch babel-core 是 babel 语法分析的核心库,的确是会如你所说的,指定 plugins 执行后得到的 result 是一个对象,它包含很多内容,比如你的 options (也就是 core 执行传给的参数),ast 是抽象语法树,可以理解为是给解析器看的,然后 code 就是编译后的代码了,你可以打出来看看~ 但是像我们平常用,很少直接用到 babel-core,通常是用 babel-cli 或者是 babel-loader。babel-cli 就是执行 babel 的时候调用的,比如 ```babel a.js --out-file b.js```,就是把 a 文件通过...

@toastsgithub 业务库是什么意思。入口文件在 package.json 里声明啊,main/ module。 ```js "main": "lib/index.js", ```

@johanazhu 哈哈,哪里感动到你了

@mingxing9921 大写的尴尬。。。 这篇文章都没写完

@jiangtao 谢谢大佬。

@liruilong119 你试一下 helpers 为 false 和 true 的情况,最后包的大小应该不一样。开了 helpers 跟 babel-external-helpers 的效果是一样的啊。 moduleName 就是在转译的时候,用哪个包去换语法啊,不过都是用 babel-runtime 就是了,包含 core-js,regenerator,helpers 三个静态包。

@liruilong119 promise 是用不到辅助函数的。你首先得了解,什么时候用得到 helper 函数,https://github.com/babel/babel/blob/master/packages/babel-helpers/src/helpers.js 我测试过,在另一个仓库里有,你去看看。https://github.com/sunyongjian/babel-usage/tree/master/runtime