Hot Reload Breaks with Version 1.9.0
See original GitHub issueDescription
After upgrading resium to latest version and updating my webpack config to work with new ESM version of CesiumJS, I noticed that the hot reload no longer functions like it used to.
Example
If you change the color of an entity, the entity should update without changing the orientation of the globe (or anything else). After v1.8.1, any change with re-render the globe (even changes not associated with Cesium/resium). Basically, the globe flashes and everything is “reset” to initial visualization (with updated entities and stuff).
Initial state
Change globe orientation
Post update entity color in code
functional hot reload - this is what happens with resium v1.8.1 and below 😄
Post update entity color in code
new “reset” hot reload - this is what happens after resium v1.8.1 😞
The app I used for testing (with current versions and config) can be created using:
mkdir test-app && cd test-app
npx tomo-cli new app --use-react --with-cesium
An example app with the pre-ESM version of CesiumJS can be found here
After a little detective work, I found that the issue manifests itself after v1.8.1. That is v1.8.1 has hot reload with previous function (with ESM and non-ESM versions of CesiumJS). Starting with v1.9.0, hot reload no longer works as it did (per description above) and in some cases fails to hot reload or refresh at all and instead presents a this._view is undefined
error…
I step-updated all the associated dependencies and narrowed the issue down to resium. I was able to get my project to hot reload as desired using resium v1.8.1 with CesiumJS ^1.60.0 and ^1.65.0. Hot reload function was lost with both versions of CesiumJS with resium versions after v1.8.1. Code was tested with old versions of react, react-dom, and react-hot-reload.
I can try to provide more data if you need it and will help in any way I can. Any ideas from my description?
Keep up the great work! I love this project and reeeeeally want to use the current versions with hot reload as it once was 😃
ありがとうございます!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I want to fix the cause fundamentally, but I’m busy right now so it will take some time.
Workaround: put this code on
index.js
orindex.tsx