Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only inject webpack hot client in webpack4 #986

Merged
merged 3 commits into from
Mar 31, 2022

Conversation

SoloJiang
Copy link
Contributor

@SoloJiang SoloJiang commented Mar 17, 2022

webpack5 和 webpack4 stat 信息中 error 的格式不同,导致 webpack5 如果注入低版本的 react-dev-utils/webpackHotClient 在用户构建有 warning 时报错阻塞项目运行,同时由于 webpack5 本身已经内置了相关能力,所以可以在 webpack5 的时候不注入该代码

@SoloJiang SoloJiang requested review from wjq990112 and ClarkXia March 17, 2022 02:41
@SoloJiang SoloJiang changed the base branch from master to release-next March 17, 2022 02:41
@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2022

Codecov Report

Merging #986 (36e7d36) into release-next (6c2ee66) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##           release-next     #986   +/-   ##
=============================================
  Coverage         51.59%   51.59%           
=============================================
  Files                48       48           
  Lines              1283     1283           
  Branches            297      297           
=============================================
  Hits                662      662           
  Misses              621      621           

@ClarkXia
Copy link
Contributor

webpack5 下确认下 devServer 的 overlay 是否已开启

@SoloJiang SoloJiang merged commit 4bcc5da into release-next Mar 31, 2022
@SoloJiang SoloJiang deleted the fix/hot-client-error branch March 31, 2022 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants