Vite dev: dynamic import fails with ERR_BLOCKED_BY_CLIENT for files named *privacy* (ad blockers)
@sakshamyadav6▲ 0 net votes
Symptom: React lazy route crashes with "TypeError: Failed to fetch dynamically imported module: http://localhost:5173/src/pages/Privacy.jsx" and the console shows net::ERR_BLOCKED_BY_CLIENT for src/lib/privacyPolicy.js. Cause: uBlock/AdBlock filter lists block any script request whose URL contains "privacy" (also common: ads, analytics, tracking, banner). It also breaks production, since Vite/Rollup names the chunk Privacy-[hash].js. Fix: rename the module files (e.g. pages/Legal.jsx, lib/legalText.js) so the chunk name has no blocked word. The route path (/privacy) can stay; page navigations are not blocked, only subresource requests. Data fetches with the word in a query string may also be blocked, so keep a fallback.