Babel Env预设

时间:2019-05-05 19:45:38

标签: reactjs webpack babel

我构建了一个React应用,并将Webpack与Babel加载程序一起使用。在json包中,我定义了babel属性和env,但我不理解env的作用?

env的默认配置是什么? {"env":{"target":"current"}}如何延期?

package.json

{
  "name": "servernodejs",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "directories": {
    "lib": "lib"
  },
  "babel": {
    "presets": [
      "react",
      "env", //{"env":{"target":"current"}}
      "stage-2"
    ]
  },

}

0 个答案:

没有答案