Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning ... : we recommend using babel-preset-env now: #15

Closed
shallinta opened this issue Nov 6, 2017 · 2 comments
Closed

warning ... : we recommend using babel-preset-env now: #15

shallinta opened this issue Nov 6, 2017 · 2 comments

Comments

@shallinta
Copy link
Collaborator

shallinta commented Nov 6, 2017

安装依赖包时提示:

warning packing > babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

babel-preset-env代码已经合并到babel工程的babel/experimental/babel-preset-env/目录。

npm install babel-preset-env --save-dev

可以使用的配置:

{
  "presets": [
    [
      "env", {
        "useBuiltIns": "entry",
        "modules": false,
        "targets": {
          "browsers": ["> 1%", "Android >= 4.4", "IOS >= 7", "ie >= 9"],
          "node": "4.0"
        }
      }
    ]
  ],

  "plugins": []
}
@venoral
Copy link

venoral commented Nov 7, 2017

I agree ...

@zhongzhi107
Copy link
Collaborator

zhongzhi107 commented Dec 6, 2017

packing@2.5.2

项目中的 .babelrc 修改成如下:

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["> 1%", "Android >= 4.4", "IOS >= 7", "ie >= 9"]
      }
    }]
  ],

  "plugins": [
    "add-module-exports",
    "transform-decorators-legacy"
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants