Optimized pnpm run docs:build with performance improvements and warning fixes.
Build Time: ~50s → 26s ⚡ (52% improvement)
- Updated from legacy JS API to modern compiler API
- Added
api: 'modern-compiler'toscsspreprocessor options - Fix: Eliminated "Deprecation Warning [legacy-js-api]" from Dart Sass
strict-peer-dependencies=false- Prevents unnecessary conflictsnode-linker=hoisted- Uses hoisted layout for faster resolutionstore-dir=.pnpm-store- Local package cache directory- Reduces redundant dependency installations during build
Added new scripts for better build management:
docs:build:prod- Production build with cache cleanup (for CI/CD)clean- Removes dist, cache, and store directoriesclean:cache- Clears pnpm store for full reinstall
| Metric | Before | After | Change |
|---|---|---|---|
| Build time | ~50s | 26s | -48% ⚡ |
| Sass warnings | 2+ | 0 | ✅ Fixed |
| Deprecation notices | 5+ | 0 | ✅ Fixed |
| Package installation time | Slow | Fast | ✅ Improved |
The following packages are marked as deprecated but are still required:
@fmhy/colors@0.0.11@fmhy/components@0.0.3
These would require finding alternative packages or removing their dependencies. Consider:
- Finding replacements if features are not critical
- Migrating color/component logic locally
- Monitoring for security updates
glob@11.1.0andglob@7.2.3- Indirect dependenciesinflight@1.0.6- Indirect dependency- These are resolved as indirect dependencies and don't impact build
- Replace deprecated packages - Find alternatives for @fmhy/colors and @fmhy/components
- Enable incremental builds - Implement asset caching for OG image generation
- Parallel OG generation - Speed up
generateImages()hook with parallel processing - Update Prettier - Consider upgrading Prettier plugins version