We currently use the Vite Plugin to build our production website. When building for production, all files under the addPassthroughCopy are not included in the output folder. It seems this is a common issue and is currently not resolved in the upstream: https://github.com/11ty/eleventy-plugin-vite/issues/42
Solution
Remove the Vite Plugin from the project and addPassthroughCopy works as intended. Images can be found and are now displayed. Research and consider other build tools to use.
Removed vite plugin due to passthrough copy bug
Problem
We currently use the Vite Plugin to build our production website. When building for production, all files under the
addPassthroughCopy
are not included in the output folder. It seems this is a common issue and is currently not resolved in the upstream: https://github.com/11ty/eleventy-plugin-vite/issues/42Solution
Remove the Vite Plugin from the project and
addPassthroughCopy
works as intended. Images can be found and are now displayed. Research and consider other build tools to use.