Hi,
I have a Nextjs website with a search feature that requires running a script before build, it’s pretty simple:
node scripts/cache.js
That updates a file located in the cache folder like this:
export const posts = [{"id":"test-1","title":"Test 1","tags":["lifestyle","test","perrisimo"]},{"id":"test-2","title":"Test 2","tags":["test","landscape","lifestyle"]}]
it’s pretty simple, but right now if I want it to be populated, I need to do run the script manually and then commit.
Is there a simple way to do this?
Here’s the link to the website: website
Thanks