[APPS] Move inlineDynamicImports to shared backend build config#317
Open
sdkennedy2 wants to merge 1 commit intomasterfrom
Open
[APPS] Move inlineDynamicImports to shared backend build config#317sdkennedy2 wants to merge 1 commit intomasterfrom
sdkennedy2 wants to merge 1 commit intomasterfrom
Conversation
This was referenced Apr 7, 2026
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 3877b11 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
6898cb6 to
3877b11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Backend functions must each produce a single self-contained JS file — no shared chunks between them. Previously,
buildBackendFunctionscalledviteBuild()once with all functions as multi-entry input. With multiple entries, Rollup can extract common code into shared chunks, which breaks the requirement of one standalone file per function.Additionally, both the production build and dev server were independently setting
inlineDynamicImports: truein their rollup output config, duplicating the intent of the shared base config.Changes
viteBuild()is now called once per backend function instead of once for all functions. This ensures Rollup never sees multiple entries and cannot create shared chunks — each output is a single self-contained JS bundle.inlineDynamicImports: MovedinlineDynamicImports: trueintogetBaseBackendBuildConfigso the shared config is the single source of truth. Removed the redundant per-caller override in the dev server and stale comments referencing the now-centralized setting.QA Instructions
mockViteBuildis now expected to be called once per function instead of once total)Blast Radius
Documentation