coder-linx / blog

个人博客
MIT License
0 stars 0 forks source link

hexo 静态资源 js 文件添加 es6 语法支持 | 极简前端 #55

Open coder-linx opened 4 years ago

coder-linx commented 4 years ago

https://blog.jijian.link/2020-01-07/hexo-js-es6/

习惯 ES6 语法之后,再写 ES5 就有点难受了啊。作为一个小前端,必须要折腾一把,让 hexo 集成 babel ,支持 ES6 语法以及模块化。好在有 hexo-renderer-babelify插件 支持,其 源码 也很简单,只有 23 行代码(0.0.2版本)。安装步骤