Closed ricokahler closed 3 years ago
@ricokahler as an update to this, restarting the dev server does not fix the cacheing problem. I've had to either touch
the file, or delete the .next
directory.
Also, I host my site on Netlify, where I have to manually select Clear cache and deploy site
to have the changes reflected -- since they aren't when a build is triggered via git. This causes a bit of a problem when I'm trying to use build hooks, where clearing the cache isn't an option.
:tada: This issue has been resolved in version 1.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.0.2-alpha.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.2.0-alpha.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
A user of this plugin recently asked if the plugin caches because the data did not refresh on a page reload during development.
This issue occurs as a consequence of how webpack works and how it caches resources during development.
During development, webpack will cache a resource it has already loaded before and will only re-compile that source if it sees a change in the contents of the file loaded. In the case of prevals, the file doesn’t actually change but the data does.
This is known issue on my side and there are ways to fix it but it involves having the data source send some sort of event to tell webpack to re-compile the preval’ed file.
For now, workarounds are:
A better solution would most likely involve creating a mechanism for data sources to tell webpack to refresh the file (or maybe just polling). I'm open to any suggestions!