mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
Disable sharp
libvips
cache. (#10616)
* Disable `sharp` `libvips` cache. * Update sharp.ts * Add changeset * Apply suggestions from code review * Add issue to comment in sharp.ts --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
This commit is contained in:
parent
8db630c3b4
commit
317d18ef8c
2 changed files with 10 additions and 0 deletions
7
.changeset/thin-seahorses-whisper.md
Normal file
7
.changeset/thin-seahorses-whisper.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
"astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
This change disables the `sharp` `libvips` image cache as it errors when the
|
||||||
|
file is too small and operations are happening too fast (runs into a race
|
||||||
|
condition)
|
|
@ -32,6 +32,9 @@ async function loadSharp() {
|
||||||
throw new AstroError(AstroErrorData.MissingSharp);
|
throw new AstroError(AstroErrorData.MissingSharp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable the `sharp` `libvips` cache as it errors when the file is too small and operations are happening too fast (runs into a race condition) https://github.com/lovell/sharp/issues/3935#issuecomment-1881866341
|
||||||
|
sharpImport.cache(false);
|
||||||
|
|
||||||
return sharpImport;
|
return sharpImport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue