I'm trying to set up an svg/png favicon. I have the 2 files in my /public directory. Taking advantage of the automatic passthrough for the /public/ directory, when I run npm run serve, favicon assets are copied as expected, and favicon appears in dev.
However, when I run npm run build (node --require esbuild-register node_modules/.bin/eleventy), assets are not copied, and the index file is transformed.
The href for the png is converted to a base64 encoded string, the svg is parsed as a css file resulting in a favicon.[hash].css file. Neither of the assets are copied, and the favicon is missing.
Package versions:
I'm trying to set up an svg/png favicon. I have the 2 files in my
/public
directory. Taking advantage of the automatic passthrough for the/public/
directory, when I runnpm run serve
, favicon assets are copied as expected, and favicon appears in dev.However, when I run
npm run build
(node --require esbuild-register node_modules/.bin/eleventy
), assets are not copied, and the index file is transformed.The
href
for the png is converted to a base64 encoded string, thesvg
is parsed as a css file resulting in afavicon.[hash].css
file. Neither of the assets are copied, and the favicon is missing.When running in debug mode, I can see that the assets are indeed copied by Eleventy
This seems like it's a vite config issue, but not sure.