1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

fix bug to remove unnecessary preset

This commit is contained in:
Chuan Shao 2016-05-25 10:11:44 +08:00
parent f7494bc67e
commit 9c5d80d3ff

View File

@ -395,7 +395,7 @@ $ npm install --save-dev babelify babel-preset-es2015
```bash
$ browserify script.js -o bundle.js \
-t [ babelify --presets [ es2015 react ] ]
-t [ babelify --presets [ es2015 ] ]
```
上面代码将ES6脚本`script.js`,转为`bundle.js`,浏览器直接加载后者就可以了。