Port Resolve_build_size_19 onto this Angular 19 branch

Yes. Stay on Angular 19 and PrimeNG 17. Keep the lazy CSS you already shipped. Copy their JS splits. PrimeNG 19, Lara, and PrimeNgLoaderService wait for the Angular 20 upgrade. Measure after each slice so a broken import does not hide behind a smaller bundle.

Where you are

Current branch is feature/release-0.0.23/16-17-18-19 at eddf08efa8. package.json has @angular/core ~19.2.25 and CLI ~19.2.27. That is Angular 19.

PrimeNG is still ~17.18.15. Their size-fix branch is Angular 19.2.25 with PrimeNG 19.1.4 and @primeng/themes. Same Angular major. Different PrimeNG. That is the only hard mismatch.

This branch already has inject: false vendor CSS, LazyVendorCssDirective, and per-widget loadFor* calls. They do not. There is no @defer here. SharedModule still imports intl-tel, emoji-mart, color picker, timepicker, OTP, IVS, share buttons, mentions, all three video players, profile, post-submit, mobile-input, and custom-multiselect. The header still static-imports the three marketing JSON files.

Copy / skip

From their branch Here
DeferredIntlTelInputComponent plus @defer (on idle), remove NgxIntlTelInputModule from shared Copy. Keep loadForIntlTel() and the directive.
EmojiMartPickerComponent plus @defer (on immediate), remove PickerModule from shared Copy. Keep loadForEmojiMart().
Header await import() of marketing / pro / comparison data Copy. About 906 kB of source leaves the initial graph.
Make video players standalone, drop them from shared declarations, @defer (on viewport) in post-card and profile Copy the idea. Do not copy their imports. Post-card is still an NgModule component. Import each standalone player into SharedModule.imports so the template compiles. Then measure. If video.js is still in initial, move the import onto post-card after it is standalone.
Move IVS, share buttons, mentions, timepicker, OTP, color picker, profile, post-submit, mobile-input, custom-multiselect out of shared and into the feature that uses them Copy after the first three slices. This is the compile-error grind, and the rest of the 5 MB.
@defer (on idle) around timepicker, color picker, mobile-input, custom-multiselect in the form builder Copy once those components are no longer exported from shared.
Their isPlatformBrowser CSS loader and the app.component setTimeout(0) preload Skip. Keep the directive and the SSR <link> behavior you just fixed.
PrimeNG 17 to 19, @primeng/themes, Lara, PrimeNgLoaderService Deferred. Do this during the Angular 20 upgrade. This branch keeps PrimeNG 17 CSS via lazy-primeng-theme / lazy-primeng / lazy-primeicons.

1. Baseline

Record ng build --configuration=qa --prerender=false initial / lazy / styles. Prerender does not change chunk bytes. Do not commit the prefetch dirt in prerender.routes.txt, marketing generated files, or environment.ts.

2. Phone, then emoji, then marketing JSON

Three small, independent cuts. Do them in this order. Rebuild after each one.

  1. Add src/app/components/deferred-intl-tel-input/. Only this file imports NgxIntlTelInputModule. Swap every <ngx-intl-tel-input> to @defer (on idle) { <app-deferred-intl-tel-input> }. Remove the module from SharedModule. Call sites: mobile-input, personal-info, contact-us, advertise, customer-information.
  2. Add src/app/components/emoji-mart-picker/. Same pattern with @defer (on immediate) inside the existing showEmojiPicker guard in messages and chat-comments. Remove PickerModule from shared.
  3. In the header, delete the static imports of MARKETING_PAGE_DATA, MARKETING_PRO_PAGE_DATA, and COMPARISON_PAGE_DATA. Load them with await import() in the three listing methods. Port applyAsyncSafe() if SSR change detection complains.

Expect chunk-SA2WMUN6-class intl-tel to leave initial after step 1. Emoji and the 906 kB marketing files after 2 and 3. Phone fields will appear after idle. Emoji JS loads when the picker opens. Marketing nav links can fill one tick late.

3. Video players

Set standalone: true on v1, v2, and v3. Move them from SharedModule.declarations to SharedModule.imports. Add @defer (on viewport) with a placeholder in post-card and profile. Keep loadForVideoPlayer().

Click a feed video and a profile video before calling this done. Their size-fix branch removed the players from shared and left post-card as a module component with CUSTOM_ELEMENTS_SCHEMA. That can compile and still not instantiate the player. If video.js is still in the initial table, post-card is still dragging it. Make post-card standalone next and import the player only there.

4. The rest of SharedModule

One vendor or widget per commit. After you remove it from shared, the first build tells you every feature that still needs it. Put the import on that feature module or standalone component. Then wrap the form-builder cases in @defer (on idle).

Suggested order: color picker, timepicker, OTP, mentions, share buttons, IVS if the video slice did not already take it, mobile-input, custom-multiselect, post-submit, ProfileComponent.

Comments, welcome-video, sponsored-ad, and the alert-modal carousel can get viewport or idle @defer after that. Those are below-fold wins, not the initial-table win.

Deferred until Angular 20

Do not bump primeng, do not add @primeng/themes, and do not add PrimeNgLoaderService on this branch. PrimeNG 17 stays. Theme CSS stays on the existing lazy bundles and LazyVendorCssDirective.

When this app moves to Angular 20, that upgrade owns PrimeNG 20, the Lara preset, and whether Lara is eager in AppModule or loaded later. Doing it now would mix a theme migration into a module-graph cut.

Check after each slice

Risks

Assumptions