Skip to content

Site: replace Parcel with Vite to speed up dotnet builds - #3884

Draft
reakaleek wants to merge 5 commits into
mainfrom
cursor/28123fe5
Draft

Site: replace Parcel with Vite to speed up dotnet builds#3884
reakaleek wants to merge 5 commits into
mainfrom
cursor/28123fe5

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Why

  • Every dotnet build that pulls in Site runs npm ci and a Parcel bundle step, which adds tens of seconds on cold CI runs and local worktrees
  • Parcel’s dependency tree also inflates install time even when frontend sources did not change

What

  • Replace Parcel with Vite 8 for production and watch builds, keeping stable _static filenames the C# embed layer expects
  • Add MSBuild skip hooks (DesignTimeBuild, SkipNpmBuild) and cache node_modules in CI when the lockfile stamp is current
  • Remove the Windows Parcel TEMP workaround and unused npm install from the API Dockerfile

Notes

  • Vite emits code-split chunks under _static/assets/; embed globs and a pre-build clean target were updated accordingly
  • Installer spike stayed on npm ci after the smaller Vite tree; timings are in tasks/plan.md

Made with Cursor

@reakaleek
reakaleek requested a review from a team as a code owner August 17, 2026 19:20
@reakaleek
reakaleek requested a review from technige August 17, 2026 19:20
reakaleek and others added 2 commits August 17, 2026 21:25
Parcel added ~17s to every Site compile and bloated npm ci. Vite cuts
the bundle step to ~2s, shrinks the dependency tree, and adds MSBuild
skip/cache hooks so warm builds avoid reinstalling packages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove tasks/plan.md and tasks/todo.md from the repo and ignore tasks/
so local planning artifacts are not committed again.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate the lockfile without platform-filtered node_modules so npm ci installs Rolldown bindings on Linux and Windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Vite emits top-level imports, so the classic script tag prevented HTMX from starting and caused synthetics navigation to reload the page.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep generated assets flat so embedded-resource extraction preserves the paths used by frontend modules.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant