farmOS / field-kit

A modular, offline-first companion app to farmOS.
https://farmOS.org
GNU General Public License v3.0
59 stars 38 forks source link

Mixin methods not found during HMR in development #470

Closed jgaehring closed 2 years ago

jgaehring commented 2 years ago

This is very low priority, but there is a problem in development where component methods, like this.updateLog() seem to be undefined on the main route components of field module and throw a "this.updateLog is not a function" error, but it only occurs after a change to a component is saved and triggers HMR (Hot Module Reloading). These methods are added by the routeMixin and work fine again after refreshing the page, and I haven't seen this in production, but it is pretty darn annoying for the dev workflow.

I think it may be related to #424. I've seen similar errors at various times in the past, but it's reappeared most recently after the big refactoring job for the alpha release, most likely due to some change in the "monster" commit, 59c3f30.