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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4f82c91ae4
commit
29cfed5b14
@@ -29,9 +29,11 @@ export function devServer(): Plugin[] {
|
||||
// Don't cache in dev
|
||||
url.searchParams.delete(ASSET_CACHE_BUST_KEY);
|
||||
|
||||
// Check if it's a vite url
|
||||
// Check if it's a vite url or a node_modules asset (e.g. fonts
|
||||
// referenced from CSS in npm packages)
|
||||
if (
|
||||
IGNORE_URLS.test(url.pathname) ||
|
||||
url.pathname.startsWith("/node_modules/") ||
|
||||
server.environments.client.moduleGraph.urlToModuleMap.has(
|
||||
url.pathname,
|
||||
) ||
|
||||
|
||||
Reference in New Issue
Block a user