vue.js - 我的 Vue webapp 的 browserslistrc 应该是什么样子才能支持非常旧的 Safari 版本?
问题描述
我有一台运行 iOS 5 的旧 iPad gen 1,我想让我的 Vue webapp(使用 Vue CLI 创建)运行。因此我决定将我browserslistrc
的更新为以下以支持旧版本的 Safari 浏览器:
> 1%
last 2 versions
not dead
ios_saf 5.1
ios_saf 5.0
safari 5.1
safari 5.0
我的npm build
命令如下:vue-cli-service-build --modern
现在,当我运行npm run build
代码并将代码部署到我的服务器时,当我在 iPad (safari) 上访问服务器时,不会显示 web 应用程序。不过,该 web 应用程序在现代浏览器上是可见的。
我也尝试last 20 versions
过我browserslistrc
的,甚至包括 safari 5.0 之前的版本(运行时npx browserslist
)。不幸的是,该网络应用程序仍然无法在我的 iPad 上运行。
我错过了什么吗?我已关注https://cli.vuejs.org/guide/browser-compatibility.html,但我无法让 webapp 在我的 iPad 上运行。
我的package.json
:
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.20.0",
"core-js": "^3.6.5",
"sass": "^1.27.0",
"sass-loader": "^10.0.3",
"vue": "^2.6.11",
"vue-axios": "^2.1.5",
"vue-device-detector": "^1.1.6",
"vue-material": "^1.0.0-beta-15",
"vue-router": "^3.2.0",
"vuelidate": "^0.7.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
}
}
我的babel.config.js
:
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
解决方案
推荐阅读
- django - 将apps.py编辑为信号后,信号出现Django AppRegistryNotReady错误
- mysql - SQL - 加入 3 表查询
- php - 如何将 PHP 变量放到重定向页面上
- plugins - DITA-OT,使用自定义插件返回静态错误
- python - 抓取 html 表以获取信息(python)
- qt - QML - TableViewColumn 快速控制 1 警报“模型大小 -2 小于 0”
- api - 我可以说用usb传输数据是API吗?
- reactjs - 状态中未定义的 React Props(在构造函数内部)仅在渲染方法中可用
- python - 处理训练和测试数据中缺失值的适当方法
- r - 解析字符串以在 R 中列出