-
Notifications
You must be signed in to change notification settings - Fork 148
Filter out node_modules without breaking nx monorepos #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)); | ||
} | ||
} | ||
|
@@ -191,6 +193,15 @@ async function generateBundleYaml( | |
frameworkVersion: nextVersion, | ||
}, | ||
}; | ||
// TODO (b/432285470) See if there is a way to also delete files for apps using Nx monorepos | ||
if (!process.env.MONOREPO_COMMAND) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think proper behavior is that we support monorepo projects as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah can create a bug and link it here to support nx monorepos properly. I don't have much experience there right now so I don't know immediately how to solve this issues since the standalone build doesn't come with a node_modules for some reason but adding the todo will be a good reminder for later anyways |
||
outputBundle.outputFiles = { | ||
serverApp: { | ||
include: [normalize(relative(cwd, opts.outputDirectoryAppPath))], | ||
}, | ||
}; | ||
} | ||
|
||
await writeFile(opts.bundleYamlPath, yamlStringify(outputBundle)); | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be the mechanism for handling output files when it is a monorepo then, does this mean we do not delete any files without serverApp being set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx monorepos at least will behave as they've always behaved in the past, nothing is deleted