Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@apphosting/adapter-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apphosting/adapter-nextjs",
"version": "14.0.14",
"version": "14.0.15",
"main": "dist/index.js",
"description": "Experimental addon to the Firebase CLI to add web framework support",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ metadata:
adapterVersion: ${adapterMetadata.adapterVersion}
framework: nextjs
frameworkVersion: ${defaultNextVersion}
outputFiles:
serverApp:
include:
- .next/standalone
`,
};
validateTestFiles(tmpDir, expectedFiles);
Expand Down
9 changes: 8 additions & 1 deletion packages/@apphosting/adapter-nextjs/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ async function moveResources(
for (const path of pathsToMove) {
const isbundleYamlDir = join(appDir, path) === dirname(bundleYamlPath);
const existsInOutputBundle = await exists(join(outputBundleAppDir, path));
if (!isbundleYamlDir && !existsInOutputBundle) {
// Keep apphosting.yaml files in the root directory still, as later steps expect them to be there
const isApphostingYaml = path === "apphosting_preprocessed" || path === "apphosting.yaml";
if (!isbundleYamlDir && !existsInOutputBundle && !isApphostingYaml) {
await move(join(appDir, path), join(outputBundleAppDir, path));
}
}
Expand Down Expand Up @@ -190,6 +192,11 @@ async function generateBundleYaml(
framework: "nextjs",
frameworkVersion: nextVersion,
},
outputFiles: {
serverApp: {
include: [".next/standalone"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming we're already moving in .next/static and public.

Also, let's only do this for developers manually specifying output: "standalone" for now, so we aren't breaking anyone. I see if I can wrap the draft MSA today.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’re actually moving everything else still, the only thing we’re removing with this change is the root dir’s node_modules.

Isn’t that extra in all cases so this shouldn’t break anyone?

},
},
};
await writeFile(opts.bundleYamlPath, yamlStringify(outputBundle));
return;
Expand Down