mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #441] perf: og-inline-fetch-assets blocks Vite transform pipeline with sync I/O #98
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Divkix on GitHub (Mar 11, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/441
Problem
The
vinext:og-inline-fetch-assetsplugin (packages/vinext/src/index.ts) uses synchronousfs.readFileSync()in Vite'stransformhook at two locations. This blocks the Vite transform pipeline during builds, especially when multiple modules reference the same font/asset files.Expected behavior
The transform hook should use async
fs.promises.readFile()and cache repeated reads to avoid redundant disk I/O.Fix
PR #435