Skip to content

Instantly share code, notes, and snippets.

@mdabir1203
Last active September 15, 2025 01:28
Show Gist options
  • Select an option

  • Save mdabir1203/9ff639c752075095a26e491f68ba2c62 to your computer and use it in GitHub Desktop.

Select an option

Save mdabir1203/9ff639c752075095a26e491f68ba2c62 to your computer and use it in GitHub Desktop.
Optimized yarnrc file for migrating to latest yarn v4
nodeLinker: pnp
compressionLevel: 0
enableHardenedMode: false
enableTelemetry: false
tsEnableAutoTypes: true
@mdabir1203
Copy link
Copy Markdown
Author

PnP (Plug'n'Play) is optimized for Vite's ES module architecture and avoids the traditional node_modules hoisting overhead.
Vite officially supports PnP, and this setup reduces install times and avoids dependency resolution issues common in large projects.
compressionLevel: 0
Critical for zero-installs (common in Vite projects). Uncompressed archives are faster to install and more efficient for Git storage (as noted in the docs).
enableHardenedMode: false
Disables remote registry validation checks during installs, which speeds up installation times. This is safe for local development (only needed for untrusted CI environments).
enableTelemetry: false
Eliminates background telemetry network calls, reducing overhead during commands (especially useful for CI/CD pipelines).
tsEnableAutoTypes: true
Automatically installs @types packages for TypeScript dependencies when needed (enabled by default if tsconfig.json exists, but explicitly setting it ensures reliability)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment