Skip to content

Commit 8cd51b5

Browse files
hrishikesh-kpieh
andauthored
fix: allow dot files in function bundle (#3118)
Co-authored-by: Michal Piechowiak <[email protected]>
1 parent b14ff62 commit 8cd51b5

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/build/content/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export const copyNextServerCode = async (ctx: PluginContext): Promise<void> => {
111111
],
112112
{
113113
cwd: srcDir,
114+
dot: true,
114115
extglob: true,
115116
},
116117
)

tests/e2e/simple-app.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,12 @@ test.describe('RSC cache poisoning', () => {
342342
expect(htmlResponse?.headers()['debug-netlify-cdn-cache-control']).toMatch(/s-maxage=31536000/)
343343
})
344344
})
345+
346+
test('Handles route with a path segment starting with dot correctly', async ({ simple }) => {
347+
const response = await fetch(`${simple.url}/.well-known/farcaster`)
348+
349+
expect(response.status).toBe(200)
350+
351+
const data = await response.json()
352+
expect(data).toEqual({ msg: 'Hi!' })
353+
})
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { NextResponse } from 'next/server'
2+
3+
export async function GET() {
4+
return NextResponse.json({
5+
msg: 'Hi!',
6+
})
7+
}
8+
9+
export const dynamic = 'force-dynamic'

0 commit comments

Comments
 (0)