Skip to content

scaffold: document monorepo self-contained deploy; bundling optional - #1645

Open
Nathan (nturinski) wants to merge 2 commits into
feat/CoRfrom
docs/scaffold-monorepo-deploy
Open

scaffold: document monorepo self-contained deploy; bundling optional#1645
Nathan (nturinski) wants to merge 2 commits into
feat/CoRfrom
docs/scaffold-monorepo-deploy

Conversation

@nturinski

Copy link
Copy Markdown
Member

Keep the idiomatic modular per-file + glob-main Functions layout as the default. Fix the monorepo deployment failures at the deployment layer instead of switching to bundling:

  • Preferred shared fix: import shared via relative paths so tsc compiles it into the service dist (no workspace-package runtime dependency to resolve in a per-service deploy).

  • Resolve hoisted third-party deps with a service-level production install.

  • Document esbuild --packages=external single-file bundling as an OPTIONAL cold-start/single-artifact optimization, not the default.

…ional

Keep the idiomatic modular per-file + glob-main Functions layout as the default. Fix the monorepo deployment failures at the deployment layer instead of switching to bundling:

- Preferred shared fix: import shared via relative paths so tsc compiles it into the service dist (no workspace-package runtime dependency to resolve in a per-service deploy).

- Resolve hoisted third-party deps with a service-level production install.

- Document esbuild --packages=external single-file bundling as an OPTIONAL cold-start/single-artifact optimization, not the default.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the TypeScript runtime and scaffold agent guidance to keep Azure Functions services deployable as independent artifacts in monorepo/npm-workspaces setups, while keeping the default modular per-function-file layout and positioning bundling as optional.

Changes:

  • Document monorepo/npm-workspaces deployment pitfalls and the preferred “self-contained service” approach (compile shared code into service output + handle hoisted deps).
  • Clarify that single-file bundling (esbuild --packages=external) is an opt-in optimization rather than the default scaffold layout.
  • Extend scaffold rules to include monorepo-specific deployment guidance and cross-workspace dependency handling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
resources/agents/shared-references/runtimes/typescript.md Adds monorepo/workspaces deployment guidance and optional bundling notes to the TypeScript Functions deployment contract section.
resources/agents/azure-project-scaffold/instructions.md Updates scaffold rule #13 to include monorepo self-contained deploy guidance and notes bundling is optional.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread resources/agents/shared-references/runtimes/typescript.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

4 participants