我们已经更新了一个从7.2版到8版的角形应用程序。到目前为止,更新过程已经开始工作了,该应用程序可以在本地和prod模式下(在服务器上)使用,如Chrome,Firefox Developer Edition,Safari,Opera。
,但在普通的火狐浏览器和水狐中,应用程序不起作用:
我们创建了一个具有以下内容的浏览器列表文件:
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
我们的tsconfig如下所示:
{
"compileOnSave": false,
"compilerOptions": {
"downlevelIteration": true,
"importHelpers": true,
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"Node_modules / @ types"
]
"lib": [
"ES2016"
"Dom"
]
"module": "esnext"
}
}
和angular.json内部具有ssl配置的区域--所以:
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "farm-management-ui:build",
"port": 8080,
"ssl": true,
"proxyConfig": "src/proxy.conf.js"
},
我们已经成功地执行了以下命令:
ng更新@ angular / cli --从7迁移到8-只迁移
ng更新@ angular / core -从7迁移到8-只迁移
我有一种感觉,如果这个应用程序在Firefox中运行,就会创建一个没完没了的循环,因为我也不能打开其他网页,比如Stackoverflow等等。
为什么Firefox突然有这种行为,我们如何解决这个问题?
发布于 2019-11-08 11:40:54
应用程序在tsconfig.json中将属性target
从es2015更改为旧值es5。
发布于 2022-09-29 10:16:36
在终端中尝试这个命令
npm zone.js@latest
之后,我可以在Firefox上运行我的应用程序。
https://stackoverflow.com/questions/56834541
复制相似问题