Open
Conversation
|
|
commit: |
antfu
reviewed
Dec 1, 2025
Member
antfu
left a comment
There was a problem hiding this comment.
I am not sure about this solution, as this would require users to write their own resolvers, which would cost too much work and introduce a lot of false negatives. And I would not expect majority of our users aware of this config and know how to write the resolver.
I would wish something more smart/automatic.
Maybe we should host the fs loading, to introduce a new option to set the relationship between files and icon conventions, where we augment FileSystemIconLoader internally, while still having the information for HMR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds HMR support for Vite (only) for local SVG files, added a new
hmrResolveroption to resolve local icon collection/name from the file.Linked Issues
resolves #424
Additional context
/cc @antfu maybe we can also add support for webpack and some others bundlers but I'm lazy to check them (sorry 🙏)