diff --git a/packages/next/server/dev/next-dev-server.ts b/packages/next/server/dev/next-dev-server.ts index 3f73466ec4588ce..59fc5d88f50f780 100644 --- a/packages/next/server/dev/next-dev-server.ts +++ b/packages/next/server/dev/next-dev-server.ts @@ -266,7 +266,7 @@ export default class DevServer extends Server { }) const wp = (this.webpackWatcher = new Watchpack({ - ignored: /(node_modules|\.next)/, + ignored: /([/\\]node_modules[/\\]|[/\\]\.next[/\\]|[/\\]\.git[/\\])/, })) const pages = [this.pagesDir] const app = this.appDir ? [this.appDir] : [] diff --git a/test/integration/api-support/pages/api/auth/[...nextauth].js b/test/integration/api-support/pages/api/auth/[...nextauth].js new file mode 100644 index 000000000000000..1e7a4bcf4844f2f --- /dev/null +++ b/test/integration/api-support/pages/api/auth/[...nextauth].js @@ -0,0 +1,3 @@ +export default function handler(req, res) { + res.json({ from: 'auth' }) +} diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index 12b22adcc99a06a..66953223aa2a78f 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -26,6 +26,14 @@ let mode let app function runTests(dev = false) { + it('should respond from /api/auth/[...nextauth] correctly', async () => { + const res = await fetchViaHTTP(appPort, '/api/auth/signin', undefined, { + redirect: 'manual', + }) + expect(res.status).toBe(200) + expect(await res.json()).toEqual({ from: 'auth' }) + }) + it('should handle 204 status correctly', async () => { const res = await fetchViaHTTP(appPort, '/api/status-204', undefined, { redirect: 'manual',