- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我将 HMR ( stories configure hmr ) 添加到我的 Angular 项目中,但不是热重载,而是将其完全重载。
更新到angular 8,问题没有解决。
[HMR] Cannot apply update. Need to do a full reload!
...
[HMR] Error: Aborted because ./node_modules/raw-loader/index.js!./src/app/components/tabs/remark/remark.component.html is not accepted
Update propagation: ./node_modules/raw-loader/index.js!./src/app/components/tabs/remark/remark.component.html -> ./src/app/components/tabs/remark/remark.component.ts -> ./src/app/app.module.ts -> ./src/main.ts -> 0
at hotApply (http://localhost:4201/runtime.js:525:30)
at http://localhost:4201/runtime.js:363:22
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:4201/polyfills.js:3516:26)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (http://localhost:4201/polyfills.js:3275:43)
at http://localhost:4201/polyfills.js:4035:34
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4201/polyfills.js:3548:31)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4201/polyfills.js:3320:47)
at drainMicroTaskQueue (http://localhost:4201/polyfills.js:3726:35)
最佳答案
我曾经像那样运行我的应用程序ng serve --hmr
一旦我开始使用 hmr 配置ng serve -c hmr
HMR 开始工作。
您应该确保在 angular.json
中启用了 hmr和 environment.ts
关于棱 Angular 分明。 [HMR] 无法应用更新。需要做一个完整的重新加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56537929/
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
我是一名优秀的程序员,十分优秀!