Skip to content

feat(devex): Align on Vite for production builds #50871

@webjunkie

Description

@webjunkie

Context

We switched the frontend dev server to Vite in July 2025 (PR #35247), but production builds still go through a custom esbuild pipeline (frontend/build.mjs + @posthog/esbuilder). That means two separate build systems with different configs, different behavior, and different bugs.

Goal

Use Vite as the single build tool for both development and production.

Scope / ideas

  • Audit what the esbuild pipeline does beyond bundling — multi-entry-point builds (index, exporter, render-query, toolbar), metadata generation, parallel build orchestration
  • Set up a Vite production build and validate output against current esbuild output (bundle size, chunking, etc.)
  • Replace esbuild prod config with Vite
  • Verify CI pipelines and deploy still work with the new build

Current state

Open questions

  • Why were the previous Vite prod PRs abandoned? Blockers worth understanding before another attempt.

References

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