Comments (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.
在启动 devServer 的时候,sockjs 在服务端和浏览器端建立了一个 webSocket 长连接
Q:
浏览器端跟服务端是怎么建立起来socket通信的呢?
在浏览器端,什么承载了socket通信这块业务,是把脚本塞到html中去执行吗?
from jocs.github.io.
有两个地方还有点疑惑,一是hotDownloadManifest 获取新的hash值的用处是什么?它获取模块代码不是还是使用之前的hash值吗?二是HMR在对模块进行热更新时自身有什么优化机制吗?因为webpack-dev-server/client 在接收到type为ok的消息之后就会进行reload操作,但是如果在进行reload操作时webpack-dev-middleware又检测到了新的文件变化时是会等待之前的reload操作结束之后再重新进行reload操作吗还是有什么特殊的优化机制
from jocs.github.io.
Related Issues (20)
- 一道「空间」很贵的排序算法 HOT 5
- 内存管理速成手册 HOT 1
- 通过漫画形式来解释 ArrayBuffers 和 SharedArrayBuffers
- 非科班出身,如何成为程序员? HOT 42
- 使用 Atomics 来在 SharedArrayBuffers 中避免竞用条件 HOT 2
- 新零售图片加载优化方案
- 自动化生成 H5 骨架页面
- 一种自动化生成骨架屏的方案 HOT 44
- 开源 - 汲取和共享 HOT 9
- That's what I need!!!!
- 《赋能》读后感
- 《态度》读后感
- 《见识》读后感
- Muya 编辑器介绍及架构 HOT 1
- 如何做一次高质量的技术分享
- 《斯坦福极简经济学》读后感
- 《曾国藩传》文摘及感悟
- 这就是 Univer
- marktext的开发者是**人? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jocs.github.io.