eleventy
eleventy copied to clipboard
Setting setServerPassthroughCopyBehavior('passthrough') with Vite not working
Operating system
Ubuntu
Eleventy
2.0.1
Describe the bug
When using setServerPassthroughCopyBehavior('passthrough'); in conjunction with '@11ty/eleventy-plugin-vite' results in the following error, when trying to run npx @11ty/eleventy --serve:
Init options have not yet been fetched in the setup callback. This probably means that `init()` has not yet been called.
Are there any known limitations when using Vite as middleware? Is there anything else I have to take care of when using passthrough?
Reproduction steps
No response
Expected behavior
No response
Reproduction URL
No response
Screenshots
No response
Running into the same issue - worth noting that it doesn't matter whether server.middlewareMode in Vite settings is true or false.
It also appears that if passthrough behaviour is set to "copy", Vite doesn't seem to pick up changes to copied asset folders to trigger HMR
Yep, I just stumbled upon this error as well.