This repo should reproduce the bug reported in webpack/webpack#14873 with the correct environment.
Note: This environment is my environment where I observed the bug to occur, it isn't to say it's the only or most correct environment to reproduce the bug.
- Windows 10 (latest as of March 27th, 2022)
- Node v15.5.1
- Yarn v1.22.15
- Firefox 98.0.2 (64-bit)
webpack5.70.0webpack-cli4.9.2webpack-dev-server4.7.4html-webpack-plugin5.5.0lodash4.17.21
NOTE: I've observed this isn't always deterministic. If you don't observe the error, stop the server and try again with another yarn start. Error seems to occur more often than not.
- Clone repo
- Run
yarn start - Visit http://localhost:8080/
- Open web developer console and observe everything is looking OK
- Edit
src/index.js:9and replace the string'changeme'with'changed'and save - Observe the error:
Uncaught TypeError: currentUpdate is undefined
webpackHotUpdatetypescript_playground jsonp chunk loading:44
<anonymous> index.b3cb07f96b935883211b.hot-update.js:2
NOTE: appending or prepending to the string array does not reproduce the the error. The value of a pre-existing string must be changed.
- Add a
console.log("foo");after line 15 - Changing the string in
btn.innerHTMLon line 12