- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
环境
描述错误
用vue类组件样式+typescript保存任何文件时,它根本不更新。给我以下错误:
File change detected. Starting incremental webpack compilation...
Successfully transferred bundle.609c813aedb0d81fb57e.hot-update.js on device emulator-5554.
Successfully transferred 609c813aedb0d81fb57e.hot-update.json on device emulator-5554.
JS: HMR: Checking for updates to the bundle with hmr hash 609c813aedb0d81fb57e.
JS: HMR: Ignored an update to unaccepted module:
JS: HMR: ➭ ./routes.ts
JS: HMR: ➭ ./main.ts
JS: HMR: Cannot apply update with hmr hash 609c813aedb0d81fb57e.
JS: HMR: Aborted because ./routes.ts is not accepted
JS: Update propagation: ./routes.ts -> ./main.ts
Refreshing application on device emulator-5554...
Successfully transferred bundle.js on device emulator-5554.
Successfully transferred runtime.js on device emulator-5554.
Successfully transferred vendor.js on device emulator-5554.
JS: HMR: Cannot apply update. A previous update aborted. Application needs to be restarted in order to apply the changes.
Restarting application on device emulator-5554...
这会导致整个应用程序重新启动,没有 HRM 更新。
复制
基于 nativescript 博客 NativeScript-Vue with Class Components链接上有更多示例。
下一步:创建以下模板:
<Label text="Hello" textWrap="true" />
然后在文本中添加一句问候
<Label text="Hello Hello" textWrap="true" />
检查错误。
预期行为
无需重启整个应用程序即可使用著名的 HMR。我认为这是一个严重的问题或错误,因为它会降低开发人员在等待应用程序重启时的工作效率。
最佳答案
tns debug android --no-hmr
在 nativescript-vue 和 HMR 中没有保证。 HMR 只能在更改样式文件时使用。
我仅将 tns debug android
用于样式设置。如果我进行任何其他更改,我不信任 HMR。
我添加了一个名为 yarn devan
的 yarn 脚本来加快输入过程。
我已将以下行添加到我的 package.json 文件中
{
"scripts": {
"dev": "tns debug android",
"devan": "tns debug android --no-hmr",
"devin": "tns debug ios --no-hmr",
"un": "adb uninstall com.domain.yourapp"
},
}
如果您在 nativescript-vue 项目中使用 typescipt 文件,您将始终看到 HMR 错误消息。
JS: HMR: Checking for updates to the bundle with hmr hash 7d5f6392d6103f1496e6.
JS: WARN HMR: Ignored an update to unaccepted module:
JS: WARN HMR: ➭ ./routes/index.ts
JS: WARN HMR: ➭ ./main.ts
JS: ERROR HMR: Cannot apply update with hmr hash 7d5f6392d6103f1496e6.
JS: ERROR HMR: Aborted because ./routes/index.ts is not accepted
JS: Update propagation: ./routes/index.ts -> ./main.ts
关于typescript - Nativescript-vue + Typescript - HMR 不适用于 Vue 类组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61238619/
HMR API 的 webpack 文档提到了以下方法: accept(dependencies: string[], callback: (updatedDependencies) => void)
这是我页面的初始加载: 在更改了一些文本后,HMR 被激活,但附加 DOM 而不是替换它: 有人知道是什么导致了这个问题吗?控制台上没有错误。 更新: 我在命令行中使用了 ASP.NET Core w
Minimalistic repository for problem testing 我现在有最简单的项目结构: root |-src --|index.pug --|-
我正在尝试运行一个简单的webpack-dev-server,如果相关源JavaScript文件已更改,它会在请求时编译.bundle.js文件。我目前不想启用热模块更换 (HMR)。 我的服务器正在
加载后一切正常,hmr 正在工作。然后就出现这个错误。 GET http://localhost:3000/__webpack_hmr net::ERR_INCOMPLETE_CHUNKED_ENCO
我环顾四周,但无法获得我在 stackoverflow 上看到的任何答案。 我无法使用 webpack 或 webpack dev-server 的命令行;我只能使用 Node API。 下面是我是如
我有一个与 webpack 捆绑在一起的 Express 服务器应用程序。客户端也与 webpack 捆绑在一起,并由服务器在开发模式下使用 webpack-dev-middleware 和 webp
我有使用 Typescript、ReactJS 和 Webpack 构建的前端应用程序。 我正在尝试启用 HMR。 这些是启动脚本 "build": "NODE_ENV=production $(np
有什么方法可以忽略 HMR 上的日志吗?进行多次更改后,这非常烦人,因为控制台变得巨大,而且也很难跟踪自定义日志。 这是执行日志记录的 HMR 模块的 log-apply-result.js 中的代码
我一直在玩弄 Webpack 的不同功能,并且正在慢慢理解。 典型的控制台输出: [WDS] App updated. Recompiling... [WDS] App hot update... [
我已成功设置 HMR,一切正常,包括代理后端站点。剩下的唯一问题是,除非我完全重新加载,否则我无法在浏览器中看到实际的原始代码 (ES2015)。 我是不是漏掉了什么或者这是不可能的?我使用 'che
我想在我的 React 应用程序中使用 Webpack HMR。我的 webpack 配置如下所示: var path = require('path'); var ExtractTextPlugin
我正在使用 webpack-dev-server 进行热模块替换。它工作得很好,但是这个错误每隔几秒就会出现在控制台中:GET http://mysite:8080/__webpack_hmr 404
有人知道当 Webpack 在热模式下运行时如何从 HTML Webpack 插件保存 HTML 页面吗?它在内存中保存文件,我想将它们保存到文件系统中。谢谢。 最佳答案 我用过 html-webpa
一个简单的 webpack 配置但不起作用: var path = require("path"); var HtmlWebpackPlugin = require('html-webpack-plu
我目前正在使用带有 ngrx 的 angular-cli 项目 (1.0.0-beta.25.5) 来管理状态。我关注了this article并设法让热模块更换正常工作,但是我还没有找到一种方法来在
我从 Webpack 收到以下错误: 无效的 HMR 消息后跟一串非常详细的 JSON。 我真的找不到任何资源来更好地调试它。有什么建议吗? 如果有人能告诉我为什么在整个应用程序中使用 require
我正在尝试新的 bun平台 (v0.1.6) 与 Hono . 我遵循的步骤: bun create hono test-api cd test-api bun dev 然后服务器显示这条信息: $
我正在尝试设置 webpack 的开发服务器和 HMR 以与 Shopify 主题开发一起使用。运行服务器并打开本地 IP 时,我从 Shopify 的 DNS 提供商 CloudFlare 收到此错
我试图让 HMR 与 webpack v5 一起运行,但它不起作用。当我修改并保存文件时,webpack 会正确重新编译项目,但前端没有更新。 我阅读了这篇文章并按照说明操作:https://webp
我是一名优秀的程序员,十分优秀!