$ npm install --save-dev @babel/preset-env
$ npm install --save @babel/runtime
$ npm install --save-dev @babel/plugin-transform-runtime
build: {
babel: {
"presets": ["@babel/preset-env"],
"plugins": [
["@babel/transform-runtime"]
]
}
}
.browserlistrc
.For browser- or Electron-based projects, we recommend using a .browserslistrc file to specify targets. You may already have this configuration file as it is used by many tools in the ecosystem, like autoprefixer, stylelint, eslint-plugin-compat and many others.