javascript - 为什么每次更改后 NativeScript 8 Angular 都会刷新应用程序?
问题描述
我更新到 NativeScript 8 和 Angular 11,现在我看到一个问题,当我的应用程序每次在我的代码更改后刷新并保存它时。我在安卓模拟器上测试
这是我的日志
Successfully transferred bundle.e7d690036a95e9e0a798.hot-update.json on device emulator-5554.
Successfully transferred bundle.js on device emulator-5554.
Successfully transferred bundle.e7d690036a95e9e0a798.hot-update.js on device emulator-5554.
JS: [HMR][e7d690036a95e9e0a798] failure | A module has not been accepted.
JS: [HMR][e7d690036a95e9e0a798] failure | Failed to apply.
在该日志之后,我看到我的应用程序正在刷新。这里还有我的 package.json
"dependencies": {
"@angular/animations": "~11.2.7",
"@angular/common": "~11.2.7",
"@angular/compiler": "~11.2.7",
"@angular/core": "~11.2.7",
"@angular/forms": "~11.2.7",
"@angular/platform-browser": "~11.2.7",
"@angular/platform-browser-dynamic": "~11.2.7",
"@angular/router": "~11.2.7",
"@nativescript/angular": "~11.8.0",
"@nativescript/background-http": "^5.0.2",
"@nativescript/camera": "^5.0.8",
"@nativescript/core": "^8.0.6",
"@nativescript/datetimepicker": "^2.1.3",
"@nativescript/fingerprint-auth": "^7.0.0",
"@nativescript/imagepicker": "^1.0.4",
"@nativescript/local-notifications": "^5.0.3",
"@nativescript/theme": "~3.0.1",
"@nativescript/ui-charts": "^0.1.0",
"@nstudio/nativescript-checkbox": "^2.0.4",
"@nstudio/nativescript-pulltorefresh": "^3.0.1",
"moment": "^2.29.1",
"nativescript": "^8.0.2",
"nativescript-barcodescanner": "^4.1.1",
"nativescript-carousel": "^7.0.1",
"nativescript-clipboard": "^2.1.1",
"nativescript-feedback": "^2.0.0",
"nativescript-localstorage": "^2.0.2",
"nativescript-permissions": "^1.3.11",
"nativescript-ui-calendar": "^7.0.2",
"nativescript-ui-chart": "^8.0.2",
"reflect-metadata": "~0.1.13",
"rxjs": "~6.6.7",
"save": "^2.4.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular/compiler-cli": "~11.2.7",
"@nativescript/android": "8.0.0",
"@nativescript/types": "~8.0.0",
"@nativescript/webpack": "beta",
"@ngtools/webpack": "~11.2.6",
"typescript": "~4.0.0"
},
它让我发疯,因为它比我使用 NativeScript 6-7 之前花费了更多的时间
解决方案
推荐阅读
- mongodb - 使用 $lookup 和“sub”聚合管道的查询性能非常慢
- laravel - 获取两个集合中存在的所有对象
- wordpress - Woocommerce 按 ID 列出的产品列表仅返回一个产品,而不是多个选择
- github - 链接到您的 GitHub 新闻提要?
- javascript - 失去焦点后保持插入符号显示在div中
- java - 在休眠中使用 bean 验证
- erlang - 如何将输入作为元组并将其存储在 Erlang 的变量中?
- firebase - Kotlin Firebase:无法将 java.lang.String 类型的对象转换为 com.example.Model.perizinan 类型
- wcf - 将连接的 Web 服务 WCF 引用添加到 .Net Core API 时出错
- r - R基于参考数据集创建虚拟数据集