Skip to content

feat: add SSR manifest plugin for AngularNodeAppEngine support#74

Merged
Brooooooklyn merged 2 commits intomainfrom
feat/ssr-manifest-plugin
Mar 5, 2026
Merged

feat: add SSR manifest plugin for AngularNodeAppEngine support#74
Brooooooklyn merged 2 commits intomainfrom
feat/ssr-manifest-plugin

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Mar 5, 2026

Add a Vite plugin that generates the Angular SSR manifests required by
AngularNodeAppEngine, which previously threw "Angular app engine manifest
is not set" because the OXC Vite plugin did not produce them.

Changes:

  • New angular-ssr-manifest-plugin.ts: detects SSR builds and injects
    ɵsetAngularAppManifest and ɵsetAngularAppEngineManifest into files
    that reference AngularNodeAppEngine/AngularAppEngine
  • Add ssrEntry option to PluginOptions for specifying main.server.ts
  • Fix ngServerMode define to also be set during dev SSR builds
  • Add unit tests (vitest) and e2e tests (Playwright) for manifest generation

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Note

Medium Risk
Changes SSR build output by injecting code into detected server entries and tweaks build-time defines, which could affect SSR bundling/runtime if detection or paths are wrong. Coverage is improved via new unit and e2e tests, reducing regression risk.

Overview
Adds an SSR-only Vite plugin that auto-injects Angular SSR manifest setup into server entry modules that reference AngularNodeAppEngine/AngularAppEngine, generating both ɵsetAngularAppManifest (including main.server bootstrap + index.server.html asset) and ɵsetAngularAppEngineManifest (entry points/locales/hosts).

Extends the main angular() plugin with a new ssrEntry option and wires the manifest plugin into the default plugin chain. Also adjusts the build optimizer so ngServerMode is defined in dev SSR builds (not just production), and adds Vitest unit tests plus a Playwright e2e build test to validate the injected output.

Written by Cursor Bugbot for commit 67485de. This will update automatically on new commits. Configure here.

Add a Vite plugin that generates the Angular SSR manifests required by
AngularNodeAppEngine, which previously threw "Angular app engine manifest
is not set" because the OXC Vite plugin did not produce them.

Changes:
- New `angular-ssr-manifest-plugin.ts`: detects SSR builds and injects
  `ɵsetAngularAppManifest` and `ɵsetAngularAppEngineManifest` into files
  that reference AngularNodeAppEngine/AngularAppEngine
- Add `ssrEntry` option to PluginOptions for specifying main.server.ts
- Fix `ngServerMode` define to also be set during dev SSR builds
- Add unit tests (vitest) and e2e tests (Playwright) for manifest generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Use Vite's `normalizePath()` on the `relative()` output to convert
backslash-separated Windows paths to forward slashes before interpolating
into the `import()` expression.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Brooooooklyn Brooooooklyn merged commit 4245d55 into main Mar 5, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the feat/ssr-manifest-plugin branch March 5, 2026 02:32
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.

1 participant