You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to public/_headers. Which doesn't seem right. I would expect only .vercel/output/static/_headers to contain the auto generated content and not public/_headers too
Vercel hard links the public directory so when next-on-pages appends to
the vercel output directory, it is also appending to the original
`public/_headers` file too.
This commit fixes the problem by copying the contents to memory before
unlinking the file and creating a new (non-linked) file.
I was able to test out this patch and saw it worked for when `_headers`
exists and when it is absent.
Closescloudflare#848
next-on-pages environment related information
Description
Each invocation of:
Appends another instance of:
to
public/_headers
. Which doesn't seem right. I would expect only.vercel/output/static/_headers
to contain the auto generated content and notpublic/_headers
tooReproduction
npx create-next-app@latest my-next-app cd my-next-app npm install -D @cloudflare/next-on-pages touch public/_headers npx @cloudflare/next-on-pages@1 cat public/_headers
Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
The bug is due to vercel hardlinking public assets directory.
https://github.com/vercel/vercel/blob/8e20fed2769ff0169179d2d40fcc97cfd07a8bfe/packages/gatsby-plugin-vercel-builder/src/helpers/static.ts#L15
Perhaps next-on-pages takes matters into their own hands with the equivalent of:
Would you like to help?
The text was updated successfully, but these errors were encountered: