Skip to content

Commit

Permalink
feat: exclude files that referenced as assets (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
latin-1 committed Dec 19, 2021
1 parent daab3bf commit 800f8ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils/injectRefreshLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ function injectRefreshLoader(moduleData, injectOptions) {
if (
// Include and exclude user-specified files
match(moduleData.resource) &&
// Exclude files referenced as assets
!moduleData.type.includes('asset') &&
// Skip react-refresh and the plugin's runtime utils to prevent self-referencing -
// this is useful when using the plugin as a direct dependency,
// or when node_modules are specified to be processed.
Expand Down

0 comments on commit 800f8ba

Please sign in to comment.