我正在尝试将 msal 版本更新为 2.0.0。所有配置完成。
我正在使用 Angular 版本 10,并且在构建 Angular 应用程序时使用以下命令,因为我没有使用根路径
ng build --base-href=/mywebsite/
应用程序在此 url 中运行良好www.test.com/mywebsite
。但是登录后它会将我重定向到
https://www.test.com/abc
代替www.test.com/mywebsite/abc
我在控制台上看到了这个错误。
VM8:2759 crbug/1173575,非 JS 模块文件已弃用。
请让我知道如何解决此问题。
请有我的 package.json
{
"name": "mywebsite",
"version": "5.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.2",
"@angular/cdk": "^10.0.1",
"@angular/common": "~10.0.2",
"@angular/compiler": "~10.0.2",
"@angular/core": "~10.0.2",
"@angular/forms": "~10.0.2",
"@angular/material": "^10.0.1",
"@angular/platform-browser": "~10.0.2",
"@angular/platform-browser-dynamic": "~10.0.2",
"@angular/router": "~10.0.2",
"@azure/msal-angular": "^2.0.0",
"@azure/msal-browser": "^2.14.2",
"bootstrap": "^4.6.0",
"classlist.js": "^1.1.20150312",
"core-js": "^3.6.4",
"jquery": "^3.5.1",
"lodash.merge": "^4.6.2",
"moment": "^2.29.0",
"popper.js": "^1.16.1",
"rxjs": "~6.6.0",
"subsink": "^1.0.2",
"tslib": "^2.0.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1002.0",
"@angular/cli": "^10.0.1",
"@angular/compiler-cli": "^10.0.2",
"@angular/language-service": "~10.0.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"schematics-scss-migrate": "^1.3.13",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "~3.9.6"
}
}