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

修改babel系列包名为最新的@babel/*

This commit is contained in:
Andy Chen 2019-02-11 16:00:40 +08:00 committed by GitHub
parent 32c1d1875d
commit b51d7d91af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -789,10 +789,10 @@ class MyClass {}
目前Babel 转码器已经支持 Decorator。
首先,安装`babel-core`和`babel-plugin-transform-decorators`。由于后者包括在`babel-preset-stage-0`之中,所以改为安装`babel-preset-stage-0`亦可。
首先,安装`@babel/core`和`@babel/plugin-transform-decorators`。由于后者包括在`@babel/preset-stage-0`之中,所以改为安装`@babel/preset-stage-0`亦可。
```bash
$ npm install babel-core babel-plugin-transform-decorators
$ npm install @babel/core @babel/plugin-transform-decorators
```
然后,设置配置文件`.babelrc`