Open c-w opened 2 months ago
Confirmed that this seems due to caching /_pagefind/pagefind.js
across version updates. The console warning is useful but not a panacea (as for example it's not trivial to stumble across it during development). Perhaps it would be useful to add a cache busting param such as ?v={your_pagefind_version}
to the docs where import("/_pagefind/pagefind.js")
is referenced?
Yeah that might be a good option, though a little unfortunate to push as a requirement to the end user.
Now that Pagefind has pretty wide uptake, it might be time to enforce a goal that future JS/WASM updates are backwards compatible with each other, to stem some of the errors.
Another path might be to make Pagefind self-patch this issue. Where it currently logs the warning error, I wonder if it could instead reimport itself with a query parameter to cache bust, and defer its methods to the imported file.
Something to ruminate on!
I started seeing the following error in Sentry since upgrading to
pagefind@1.1.0
:Looks like the error is unrecoverable and all pagefind API calls afterwards fail.
Perhaps it's related to this console warning?