Skip to content

Conversation

@Yuangwang
Copy link
Collaborator

@Yuangwang Yuangwang commented Sep 11, 2024

Use the new output bundle spec for nextjs.

Also copies assets into standalone directory instead of .apphosting

await mkdir(opts.outputDirectoryBasePath);
const outputBundle: OutputBundleConfig = {
version: "v1",
serverConfig: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

How will the env var section be taken cared of here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will be done the same way things are done in the angular adapter, we'll only add it if needed. For now we don't have any env var needs and env var is optional so there is no need to add a field for it yet

const pathsToMove = await readdir(appDir);
for (const path of pathsToMove) {
const isOutputBundleDir = join(appDir, path) === outputBundleAppDir;
const isbundleYamlDir = join(appDir, path) === dirname(bundleYamlPath);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: isBundleYamlDir

async function generateBundleYaml(
outputBundleOptions: OutputBundleOptions,
nextBuildDirectory: string,
opts: OutputBundleOptions,
Copy link
Collaborator

Choose a reason for hiding this comment

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

optional nit: you can unpack this if you prefer

@Yuangwang Yuangwang merged commit 717eded into main Sep 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants