Re-enable imagetools
1 minute read
The vite-imagetools plugin was disabled in vite.config.js because it caused the build to freeze during the transform step.
Problem
The build would hang indefinitely after showing Svelte warnings, around the transform step. This is likely due to:
- Processing 340+ images with
?as=runimports - Each image being converted to 9 different widths (197-1920px)
- AVIF format conversion being CPU-intensive
- Possible memory issues or infinite loops in image processing
Investigation Steps
- Try building with fewer images first
- Check if specific images cause the freeze
- Monitor memory usage during build
- Try reducing the number of output widths
- Check imagetools version and changelog for known issues
- Consider using a different image optimization approach
Current State
The imagetools plugin is commented out in vite.config.js.
Images are imported directly without optimization.
Read next