-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In development mode, newly added SVG icons are not picked up by the spritemap automatically.
The icons only appear in the generated spritemap after manually restarting the Vite dev server.
This breaks the expected hot-reload workflow and makes iterative work with icons inconvenient.
Steps to Reproduce
- Start Vite dev server.
- Ensure @spiriit/vite-plugin-svg-spritemap is configured and working.
- Open the application in the browser and verify that existing icons are rendered correctly.
- Add a new SVG file to the icons directory (e.g. src/assets/icons/new-icon.svg).
- Try to use the new icon in the markup (e.g. ).
- Observe that the icon is not available in the spritemap.
- Restart the dev server.
- Observe that the icon now appears and works as expected.
Expected Behavior
Newly added SVG files should be automatically detected in dev mode and added to the spritemap without requiring a full server restart.
Actual Behavior
New icons are ignored until the dev server is manually restarted.
Environment
Vite: 7.1.7
@spiriit/vite-plugin-svg-spritemap: 6.0.0
OS: Windows 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working