-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite clearing addPassthroughCopy files on production? #42
Comments
I have similar problem with og:image: images are copied to destination folder, but they get I have checked Vite code and it seems that they should prpoprly process I have also submitted but to vite with more information: |
Shoot. I have just spent two straight days debugging the exact same issue and thinking I am going crazy. |
Having used the Slinkity plugin, I've come across this issue. Vite in general only processes assets that is needs, removing any files that aren't directly resolved through html files. Eleventy will build into a temp folder first, and then Vite plugin looks at that folder to process the final build. Passthrough copy, will copy files to the temp folder, and then Vite processes what it needs from there, and removes the rest. Chances are Vite is not considering these files for final build. Best bet is use the 'public' folder top level of the project. Get eleventy to passthrough copy that public folder and Vite will then process that folder to the final build. Only downside to that is these files won't be hashed, they just get copied from one directly to another.
becomes the following for final build.
There's a little more about it on the Slinkity docs: stripped assets |
Hi
I've been cracking my head on this one and would appreciate another view.
I have
eleventyConfig.addPassthroughCopy('src/assets/images')
set up because i want to use the images on myog:image
tags.However, when building for production, all my images vanish around the time we hit his part
I've tried changing the name of the folder because I thought maybe it may have something to do with using the assets folder, but no deal.
Tried passing
emptyOutDir: false,
onviteOptions
but also didn't solve.Anyone else encountered this?
Thanks
The text was updated successfully, but these errors were encountered: