From 1e30654b81307516fdc6e369999d5b1fd886841c Mon Sep 17 00:00:00 2001 From: Cynthia Date: Mon, 30 Jun 2025 13:47:14 +0200 Subject: [PATCH 1/2] docs: add tip about excluding pnpm in Microsoft Defender --- docs/installation.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 58b6177d287b..9801b5f45db9 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -27,6 +27,13 @@ Using PowerShell: Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression ``` +::: tip + +On Windows, Microsoft Defender can significantly slow down installation of packages. After installing pnpm, you can +[add the pnpm store to Microsoft Defender's list of excluded folders](#windows-performance) to get a significant speedup. + +::: + ### On POSIX systems ```sh @@ -207,6 +214,15 @@ $ which pnpm Now that you know where the pnpm CLI is, open that directory and remove any pnpm-related files (`pnpm.cmd`, `pnpx.cmd`, `pnpm`, etc). Once done, install pnpm again and it should work as expected. +### Windows performance + +On Windows, Microsoft Defender can significantly slow down installation of packages. You can add pnpm to Microsoft Defender's list +of excluded folders in a PowerShell window with administrator rights by executing: + +```powershell +Add-MpPreference -ExclusionPath $(pnpm store path) +``` + ## Using a shorter alias `pnpm` might be hard to type, so you may use a shorter alias like `pn` instead. From bd3be0952004ec271cd446f6ee9ecd2dc9e3ccf3 Mon Sep 17 00:00:00 2001 From: Cynthia Date: Sat, 5 Jul 2025 15:33:06 +0200 Subject: [PATCH 2/2] docs: move msft defender note --- docs/installation.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 9801b5f45db9..c678293bd4a3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -27,12 +27,12 @@ Using PowerShell: Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression ``` -::: tip - -On Windows, Microsoft Defender can significantly slow down installation of packages. After installing pnpm, you can -[add the pnpm store to Microsoft Defender's list of excluded folders](#windows-performance) to get a significant speedup. +On Windows, Microsoft Defender can significantly slow down installation of packages. You can add pnpm to Microsoft Defender's list +of excluded folders in a PowerShell window with administrator rights by executing: -::: +```powershell +Add-MpPreference -ExclusionPath $(pnpm store path) +``` ### On POSIX systems @@ -214,15 +214,6 @@ $ which pnpm Now that you know where the pnpm CLI is, open that directory and remove any pnpm-related files (`pnpm.cmd`, `pnpx.cmd`, `pnpm`, etc). Once done, install pnpm again and it should work as expected. -### Windows performance - -On Windows, Microsoft Defender can significantly slow down installation of packages. You can add pnpm to Microsoft Defender's list -of excluded folders in a PowerShell window with administrator rights by executing: - -```powershell -Add-MpPreference -ExclusionPath $(pnpm store path) -``` - ## Using a shorter alias `pnpm` might be hard to type, so you may use a shorter alias like `pn` instead.