Giter VIP home page Giter VIP logo

Comments (3)

Jocs avatar Jocs commented on August 11, 2024 3

我记得是这样的,在启动 webpack-dev-server 的时候,webpack 会将 sockjs client 端的代码打包到 输出的 html 中。

https://github.com/webpack/webpack-dev-server/blob/master/lib/utils/addEntries.js

刚才找到了如上文件,你可以看看。如有错误请指正。

from jocs.github.io.

simdd avatar simdd commented on August 11, 2024

在启动 devServer 的时候,sockjs 在服务端和浏览器端建立了一个 webSocket 长连接

Q:

浏览器端跟服务端是怎么建立起来socket通信的呢?
在浏览器端,什么承载了socket通信这块业务,是把脚本塞到html中去执行吗?

from jocs.github.io.

meriter avatar meriter commented on August 11, 2024

有两个地方还有点疑惑,一是hotDownloadManifest 获取新的hash值的用处是什么?它获取模块代码不是还是使用之前的hash值吗?二是HMR在对模块进行热更新时自身有什么优化机制吗?因为webpack-dev-server/client 在接收到type为ok的消息之后就会进行reload操作,但是如果在进行reload操作时webpack-dev-middleware又检测到了新的文件变化时是会等待之前的reload操作结束之后再重新进行reload操作吗还是有什么特殊的优化机制

from jocs.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.