Skip to content

Commit 29cfed5

Browse files
bartlomiejuclaude
andauthored
fix: let node_modules asset requests pass through in dev mode (#3728)
Closes #3424 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4f82c91 commit 29cfed5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/plugin-vite/src/plugins/dev_server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ export function devServer(): Plugin[] {
2929
// Don't cache in dev
3030
url.searchParams.delete(ASSET_CACHE_BUST_KEY);
3131

32-
// Check if it's a vite url
32+
// Check if it's a vite url or a node_modules asset (e.g. fonts
33+
// referenced from CSS in npm packages)
3334
if (
3435
IGNORE_URLS.test(url.pathname) ||
36+
url.pathname.startsWith("/node_modules/") ||
3537
server.environments.client.moduleGraph.urlToModuleMap.has(
3638
url.pathname,
3739
) ||

0 commit comments

Comments
 (0)