vite-plugin-svg-spritegen 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -228,7 +228,10 @@ function svgSpritegen(config) {
|
|
|
228
228
|
allSvgs = await buildSvgMap(inputConfigsResolved);
|
|
229
229
|
await writeTypes(typesFilePath, allSvgs);
|
|
230
230
|
if (config.gitignore !== false) await writeGitignore(gitignoreFilePath, "sprite.svg", "types.ts");
|
|
231
|
-
if (isBuild)
|
|
231
|
+
if (isBuild) {
|
|
232
|
+
writeIfChanged(spriteFilePath);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
232
235
|
writeSprite(spriteFilePath, allSvgs);
|
|
233
236
|
const onWatch = (changedPath) => {
|
|
234
237
|
if (changedPath === spriteFilePath) return;
|
package/dist/index.mjs
CHANGED
|
@@ -200,7 +200,10 @@ function svgSpritegen(config) {
|
|
|
200
200
|
allSvgs = await buildSvgMap(inputConfigsResolved);
|
|
201
201
|
await writeTypes(typesFilePath, allSvgs);
|
|
202
202
|
if (config.gitignore !== false) await writeGitignore(gitignoreFilePath, "sprite.svg", "types.ts");
|
|
203
|
-
if (isBuild)
|
|
203
|
+
if (isBuild) {
|
|
204
|
+
writeIfChanged(spriteFilePath);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
204
207
|
writeSprite(spriteFilePath, allSvgs);
|
|
205
208
|
const onWatch = (changedPath) => {
|
|
206
209
|
if (changedPath === spriteFilePath) return;
|
package/package.json
CHANGED