You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tool is nice and convenient, thanks. But recently I started getting a very strange Shroedingbug.
Quite often if I clear the previously generated sprites and then run the build, it would report that the files were not changed, and skip writing them to disk. This ultimately leads to the build failure.
I wasn't able to reproduce it in debug mode, so it can be some kind of the race condition.
For now, I have commented these lines in my locally patched copy of the plugin:
diff --git a/node_modules/postcss-easysprites/lib/sprites.js b/node_modules/postcss-easysprites/lib/sprites.js
index c143a18..1ed7126 100644
--- a/node_modules/postcss-easysprites/lib/sprites.js+++ b/node_modules/postcss-easysprites/lib/sprites.js@@ -52,11 +52,11 @@ async function saveSpriteFile(spriteElement) {
// Build the full path the sprite file should be saved to.
sprite.path = path.resolve(opts.spritePath, `${sprite.groups}.png`);
- // If the sprite is being pulled from the cache, don't save a new version.- if (sprite.isFromCache) {- log('Easysprites:', ansi.green(sprite.path), 'unchanged.');- return sprite;- }+ // // If the sprite is being pulled from the cache, don't save a new version.+ // if (sprite.isFromCache) {+ // log('Easysprites:', ansi.green(sprite.path), 'unchanged.');+ // return sprite;+ // }
// Save new version of the sprite image file.
await writeFileAsync(sprite.path, Buffer.from(sprite.image, 'binary'));
The text was updated successfully, but these errors were encountered:
Hi
This tool is nice and convenient, thanks. But recently I started getting a very strange Shroedingbug.
Quite often if I clear the previously generated sprites and then run the build, it would report that the files were not changed, and skip writing them to disk. This ultimately leads to the build failure.
I wasn't able to reproduce it in debug mode, so it can be some kind of the race condition.
For now, I have commented these lines in my locally patched copy of the plugin:
The text was updated successfully, but these errors were encountered: