vercel-builder
vercel-builder copied to clipboard
ServerFiles Metadata
Hi, I think that in the building process of the serverFiles, the metadata of the files are being lost or Vercel create new files on the server.
I'm using nuxt/content module an the "createdAt" property from my .MD
files in "blog-posts/**" are returning 1970-01-01T00:00:00.000Z
my vercel.json
{
"version": 2,
"builds": [
{
"src": "nuxt.config.ts",
"use": "@nuxtjs/[email protected]",
"config": {
"serverFiles": [
"lang/**",
"utils/**",
"myData.json",
"nuxt.default.config.js",
"node.tsconfig.json",
"assets/images/**",
"blog-posts/**"
],
"tscOptions": {
"skipLibCheck": true
}
}
}
]
}
I've got the same issue, did you manage to fix this @pablomuro?
{
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/vercel-builder",
"config": {
"serverFiles": [
"package.json",
"utils/getRoutes.js",
"utils/getSiteMeta.js",
".nuxt/content/**",
"content/**",
"api/**/*.js"
],
"generateStaticRoutes": true
}
},
{
"src": "api/**/*.js",
"use": "@vercel/node"
}
],
"routes" : [
...
}
@gilesbutler I did some "hack", I now have a new field in my .MD files to read the createdAt, and for updateAt I created a GitHub Action (https://github.com/pablomuro/pablomuro-blog/blob/main/.github/workflows/posts-update.yml), so when I update a .MD file, the action change the updateAt field and commit the file
Cause I didn't find any configuration or anything like on vercel to fix this
Thanks @pablomuro 👍 I'll take a look