vshepel / vite-svg-sprite-wrapper

Creating one sprite file on the fly
27 stars 5 forks source link

The sprite is not rebuilt in development mode #11

Closed uskov-dev closed 2 months ago

uskov-dev commented 6 months ago

Hello. In build mode, when the server is running, I add new files to the folder with icons or delete them from there, but the sprite is not rebuilt. The sprite is collected only when running "npm run dev" or during the build "npm run build". I am inserting the code with a picture because it is inserted crookedly.

image

image

vshepel commented 6 months ago

Hi @uskov-dev. Describe the steps to start "build mode"

uskov-dev commented 6 months ago

https://github.com/uskov-dev/vitewrap.git

If you add or delete a file in the "src/svgsprite" folder during development mode, the sprite file will not be rebuilt. It is assembled only when the project build is launched. And one more thing, if I run the project build, the sprite file is collected in the “public” folder and I don’t have it, then an error will be displayed in the console and the file will not be collected.

vshepel commented 5 months ago

@uskov-dev I have added a check for outputDir if the folder doesn't exist. Please try the new version - 1.3.1 and give me feedback if everything works for you. Thanks!