From e84571d8e36f062f1f66decd03252d6a8ca84811 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 9 Mar 2021 12:41:57 -0600 Subject: [PATCH] Add appDir field to server files manifest (#22915) This adds an `appDir` field to the `required-server-files` manifest signifying where the app source is located. x-ref: https://github.com/vercel/next.js/issues/22847 --- packages/next/build/index.ts | 1 + test/integration/required-server-files/test/index.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 92dc9a750d320..5957660eea408 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -407,6 +407,7 @@ export default async function build( compress: false, configFile: undefined, }, + appDir: dir, files: [ ROUTES_MANIFEST, path.relative(distDir, manifestPath), diff --git a/test/integration/required-server-files/test/index.test.js b/test/integration/required-server-files/test/index.test.js index cf02ed9d409d1..72ba6a93fae0c 100644 --- a/test/integration/required-server-files/test/index.test.js +++ b/test/integration/required-server-files/test/index.test.js @@ -87,6 +87,7 @@ describe('Required Server Files', () => { expect(requiredFilesManifest.ignore.length).toBeGreaterThan(0) expect(typeof requiredFilesManifest.config.configFile).toBe('undefined') expect(typeof requiredFilesManifest.config.trailingSlash).toBe('boolean') + expect(typeof requiredFilesManifest.appDir).toBe('string') for (const file of requiredFilesManifest.files) { console.log('checking', file)