[GH-ISSUE #441] perf: og-inline-fetch-assets blocks Vite transform pipeline with sync I/O #98

Closed
opened 2026-05-06 12:37:12 +02:00 by BreizhHardware · 0 comments

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-assets plugin (packages/vinext/src/index.ts) uses synchronous fs.readFileSync() in Vite's transform hook 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

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-assets` plugin (`packages/vinext/src/index.ts`) uses synchronous `fs.readFileSync()` in Vite's `transform` hook 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
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#98
No description provided.