Skip to content

Commit d0c5d3e

Browse files
committed
round 2 filtering out node_modules, this time without breaking monorepos
1 parent 4675e3e commit d0c5d3e

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@apphosting/adapter-nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apphosting/adapter-nextjs",
3-
"version": "14.0.16",
3+
"version": "14.0.17",
44
"main": "dist/index.js",
55
"description": "Experimental addon to the Firebase CLI to add web framework support",
66
"repository": {

packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ metadata:
6262
adapterVersion: ${adapterMetadata.adapterVersion}
6363
framework: nextjs
6464
frameworkVersion: ${defaultNextVersion}
65+
outputFiles:
66+
serverApp:
67+
include:
68+
- .next/standalone
6569
`,
6670
};
6771
validateTestFiles(tmpDir, expectedFiles);

packages/@apphosting/adapter-nextjs/src/utils.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ async function moveResources(
151151
for (const path of pathsToMove) {
152152
const isbundleYamlDir = join(appDir, path) === dirname(bundleYamlPath);
153153
const existsInOutputBundle = await exists(join(outputBundleAppDir, path));
154-
if (!isbundleYamlDir && !existsInOutputBundle) {
154+
// Keep apphosting.yaml files in the root directory still, as later steps expect them to be there
155+
const isApphostingYaml = path === "apphosting_preprocessed" || path === "apphosting.yaml";
156+
if (!isbundleYamlDir && !existsInOutputBundle && !isApphostingYaml) {
155157
await move(join(appDir, path), join(outputBundleAppDir, path));
156158
}
157159
}
@@ -191,6 +193,14 @@ async function generateBundleYaml(
191193
frameworkVersion: nextVersion,
192194
},
193195
};
196+
if (!process.env.MONOREPO_COMMAND) {
197+
outputBundle.outputFiles = {
198+
serverApp: {
199+
include: [opts.outputDirectoryAppPath],
200+
},
201+
};
202+
}
203+
194204
await writeFile(opts.bundleYamlPath, yamlStringify(outputBundle));
195205
return;
196206
}

0 commit comments

Comments
 (0)