fxa/apps/payments
Reino Muhl 1b9d7fff86
feat(next): reduce bundle size
Because:

- The `payments-next` builds are taking very long and using many system
  resources.
- Under normal operation, the `payments-next` service in dev mode is
  using a lot of memory and at times running into its 7gb memory limit,
  causing a service restart.

This commit:

- Adds Next.js bundle analyzer to `payments-next`
- Adds additional packages to serverComponentsExternalPackages.
  - By default Nextjs automatically bundles dependencies used in Server
    Components and Route Handlers. As a result, all dependencies used in
    the NestApp were being bundled by Next.js, which bloated the Next.js
    nodejs bundle.
  - All dependencies used in the NestApp, should not be included in the
    Next.js bundle, and should therefore be added to
    `serverComponentsExternalPackages` going forward.
  - Dependencies that are potentially used by Next.js as part of server
    side rendering or hydration of pages should still be included in the
    Next.js bundle, and should not be added to
    `serverComponentsExternalPackages`.

Closes #FXA-10712
2024-11-19 17:08:39 -05:00
..
next feat(next): reduce bundle size 2024-11-19 17:08:39 -05:00