velite icon indicating copy to clipboard operation
velite copied to clipboard

'prepare' section in example breaks build?

Open gitagogaming opened this issue 4 months ago • 2 comments

I am running into an issue where I've gotten to a point in my project that I want to manipulate the data for tags and posts collections during the build process.. it fails when we attempt to push tags

I am simply trying to do what is done in the example repo and capture the tags from any posts and then add them to the tags object... it seems if I try this and do not have .velite folder prebuilt then it will fail with the error as shown below.

Image

It does seem if I comment out the everything minus the posts.filter in the prepare statement then it builds the .velite folder fine.. If i uncomment that now, everything will work as expected..

But lets say I delete .velite folder to do a fresh build then it fails all over again..

gitagogaming avatar Aug 13 '25 02:08 gitagogaming

Can you provide a reproducible repo? in the example I provided, there is no import of "#velite" anywhere in velite.config.js

zce avatar Aug 14 '25 02:08 zce

I'm guessing you did import { posts } from '#velite' in your config file?

This is incorrect, we never import the output in the velite.config.js

zce avatar Aug 14 '25 02:08 zce