晴明的博客园 GitHub      CodePen      CodeWars     
摘要: tree shaking 只有es6模块才能使用webpack2做静态依赖解析。 因为现在大部分浏览器还不支持es6模块语法,所以我们得下载babel,利用babel对代码进行编译。 正常使用Babel 6来转换,一般设置 。 但是这种方式使用的 插件意味着Babel会将es6模块通过commonJ 阅读全文
posted @ 2017-04-26 19:11 晴明桑 阅读(1124) 评论(0) 推荐(0) 编辑