浏览器版本
firefox 21
解决措施
babel.config.js
module.exports = {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"firefox": "20",
"chrome": "12",
},
"useBuiltIns": "usage",
"corejs": "3.6.5"
}
]
]
}
package.json
{
"name": "secEditExtDemo",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^2.6.14",
"vue-router": "^3.5.1"
},
"devDependencies": {
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"vue-template-compiler": "^2.6.14"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"Firefox 20",
"chrome 12",
"ie >= 8"
]
}
npm i @babel/cli @babel/core @babel/preset-env @vue/cli-plugin-babel
配置browserslist
重启项目
解决!