Closed spaceemotion closed 9 months ago
Indeed, after Fastify v4 replies started having to be returned always in these cases.
This needs to be better reflected in the docs.
So if I open a "simple" PR that only adds the return this;
calls, would that do the trick? I can't really test the behavior outside my application right now. I don't know if this could break other plugins or how it would affect things in general.
I actually wonder where we have to patch this, but yes. If you provide a PR we would consider it gracefully ;).
This has been fixed in the latest release.
Prerequisites
Fastify version
4.24.1
Plugin version
4.0.0
Node.js version
20.2.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
docker
Description
After adding the compression plugin, i was only getting the following errors in console:
After some researching I found the following fix: https://github.com/fastify/fastify-compress/issues/215#issuecomment-1605282422
The vite plugin does not seem to return "this" from the html-callback. Overwriting the default config with the following (this is just for SPAs right now), works as it should:
Steps to Reproduce
Expected Behavior
No error upon load