Skip to content

Commit 800f8ba

Browse files
authored
feat: exclude files that referenced as assets (#545)
1 parent daab3bf commit 800f8ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/utils/injectRefreshLoader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ function injectRefreshLoader(moduleData, injectOptions) {
2626
if (
2727
// Include and exclude user-specified files
2828
match(moduleData.resource) &&
29+
// Exclude files referenced as assets
30+
!moduleData.type.includes('asset') &&
2931
// Skip react-refresh and the plugin's runtime utils to prevent self-referencing -
3032
// this is useful when using the plugin as a direct dependency,
3133
// or when node_modules are specified to be processed.

0 commit comments

Comments
 (0)