Skip to content

Speed up marketing app local compilation by removing Webpack-only content loaders #101

Description

@willwashburn

Problem

Cold-compiling the marketing app's /teams route took 10.7s in Next.js (12.2s total request). The local Next trace attributed about 5.5s to the server Webpack compilation and 4.9s to the client compilation; the generated development client chunk was about 15 MB. This is compile latency, not browser page-load or database latency.

The marketing app is explicitly launched with --webpack in web/package.json . This is intentional compatibility behavior, not a stray flag: the Next 16 upgrade retained Webpack for the SKILL.md?raw loader, and web/lib/content-store.ts also uses Webpack require.context plus asset/source to embed docs/blog MDX for the filesystem-free Cloudflare Worker runtime.

Proposed work

  • Replace or adapt both Webpack-only content paths (SKILL.md?raw and docs/blog require.context) so local development can use Turbopack without changing content behavior.
  • Update the marketing dev script only after the replacement works.
  • Confirm production/OpenNext build compatibility separately; do not sacrifice the Worker-safe, build-time embedded content behavior.
  • Profile the /teams client import graph (shared animated landing components, CSS, icon packages) if compilation remains slow after switching bundlers.

Acceptance criteria

  • /teams, docs/blog pages, skill-markdown routes, and the onboarding handoff work in paired local development.
  • The Cloudflare/OpenNext build and existing page/content tests pass.
  • Record comparable cold and warm /teams compile timings before and after, without clearing caches between only one side of the comparison.
  • No --webpack requirement remains in the local marketing dev path, or document a measured reason if it must remain.

No deployment, preview, or production change is implied by this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions