gpt4 book ai didi

angularjs - Angular 2 到 4 迁移的 package.json 更改

转载 作者:太空狗 更新时间:2023-10-29 17:37:02 28 4
gpt4 key购买 nike

目前,该应用程序在 Angular 2.0.0 上运行。为了与 Angular 4 兼容,需要更改哪些包或依赖项?到目前为止,我已经更改了以下内容,

"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/router": "4.0.0",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "4.0.0",
"angular2-toaster": "2.0.0",
"rxjs": "^5.0.1",
"typescript": "^2.1.5",
"zone.js": "^0.8.4"
}

是否还有其他需要更改的包/依赖项?

我应该更改 tsconfig.json 吗?

{


"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"es5",
"es2015",
"es2017",
"dom",
"scripthost"
],
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noEmitHelpers": true,
"allowNonTsExtensions" : true
},
"exclude": [
"node_modules",
"typings/main.d.ts",
"typings/main"
],
"filesGlob": [
"./src/**/*.ts",
"./test/**/*.ts",
"!./node_modules/**/*.ts",
"src/custom_typings.d.ts",
"typings/browser.d.ts"
],
"awesomeTypescriptLoaderOptions": {
"resolveGlobs": true,
"forkChecker": true
},
"compileOnSave": false,
"buildOnSave": false,
"atom": { "rewriteTsconfig": false }
}

最佳答案

我通常使用此处的文件作为指导:https://github.com/angular/quickstart

它提供了应用程序所需的一组基本种子文件,并且它通常与 Angular 保持同步,因为它是 angular.io 上 Angular 文档的一部分。

关于angularjs - Angular 2 到 4 迁移的 package.json 更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43079183/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com