Commit b1d6211 1 parent 08d093c commit b1d6211 Copy full SHA for b1d6211
File tree 1 file changed +5
-1
lines changed
packages/vite/src/node/plugins
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
338
338
url = resolved . id . slice ( root . length )
339
339
} else if (
340
340
depsOptimizer ?. isOptimizedDepFile ( resolved . id ) ||
341
- ( path . isAbsolute ( cleanUrl ( resolved . id ) ) &&
341
+ // vite-plugin-react isn't following the leading \0 virtual module convention.
342
+ // This is a temporary hack to avoid expensive fs checks for React apps.
343
+ // We'll remove this as soon we're able to fix the react plugins.
344
+ ( resolved . id !== '/@react-refresh' &&
345
+ path . isAbsolute ( resolved . id ) &&
342
346
fsUtils . existsSync ( cleanUrl ( resolved . id ) ) )
343
347
) {
344
348
// an optimized deps may not yet exists in the filesystem, or
You can’t perform that action at this time.
0 commit comments