Live data from Hacker News

Hello Yarn 2, Goodbye node_modules

freddixx.medium.com

1–10 of 160 posts

Re: Hello Yarn 2, Goodbye node_modules

#4
post #2

Kind of frustrating that this article doesn’t really describe in a nutshell how they do it, despite it being the title. It kind of assumes you already read about dropping node_modules.

For anyone curious, that’s mainly described in the linked article here: https://yarnpkg.com/features/pnp

Re: Hello Yarn 2, Goodbye node_modules

#7

So the cost is you add another tool (yarn) to your toolchain and this is better than NPM because your deps are all in one folder and just mapped through a header file instead of being duplicated for every project, am I understanding that right?

For a good while most people were better served by yarn anyway. I don't know exactly the current state of npm, but part of yarn's draw (even prior to the pnp aspect) was having deterministic builds. Even with a package lockfile, npm couldn't do that.
Post reply on HN