Switch to pnpm for frontend development#73
Conversation
pnpm is faster and more space-efficient than npm
This is necessary to continue building after switching to PNPM, because some combination of outdated packages wasn't handling pnpm's node_modules layout after the switch. Everything builds and runs fine after this package upgrade.
|
Some combination of outdated packages, probably some Vite plugin for Svelte given the error message I was seeing, was failing to run after the PNPM switch. I assume it has to do with the new |
|
@myieye In #70 (comment), @hahn-kev mentioned that he's already using PNPM, so I'm sure he'd be in favor of this switch. So I'd like you to review this PR, if you would. That way I'll know that everyone's on board and it's ready to merge. |
hahn-kev
left a comment
There was a problem hiding this comment.
Looks good, let's wait for Tim to respond before we go ahead though.
| dotnet watch | ||
| ``` | ||
|
|
||
| If you don't have pnpm installed, run `npm install -g pnpm`. |
There was a problem hiding this comment.
Actually it would be better to suggest using corepack to install it, like this corepack prepare pnpm@latest --activate as suggested by their documentation. Core pack is a feature in more recent node versions that help you manage other package managers.
There was a problem hiding this comment.
We could specify the package manager in this file like this: "packageManager": "pnpm@8.5.1"
I'm not sure, but I believe that will tell node which package manager we want to use, it should mean that we don't even need to instruct users to install pnpm manually and it should get installed automatically, but I need to check up on how that works exactly.
|
@rmunn fine with me 👍 |
|
I'll look into how to specify pnpm via corepack, and maybe do it as a separate PR. Merging this one so that we can get moving. |
|
Opened #75 to track remaining work. |
pnpm is faster and more space-efficient than npm
Fixes #70.