Better HN
topnewbestaskshowjobs
Log inSign up

arthurwhite

22 karma · joined Jun 14, 2017 (9y ago) · 8 submissions

Submissions

comment 3y ago · link · parent

Maybe not on their machine, but for Docker images that will be pulled a thousand times, yes.

comment 3y ago · link · parent

Not everyone uses the .npmignore file. Maybe it's the author's choice, but in the meantime, that's my personal storage space that's being used unnecessarily.

I tested it recently on a clean install of Strapi: about 250 MB are freed up. Storage is cheap but that still represents a lot, especially inside a Docker image.

The patterns used to find files are specific enough to target only those files that are well known to be useless at runtime.

comment 3y ago · link · parent

While pnpm optimizes storage and reduces duplication, it does not inherently remove non-essential files (like documentation, Markdown, or test files) within the dependencies.

Also, when you create a Docker image, you avoid packing in dev tools that aren't absolutely essential (such as pnpm).

comment 3y ago · link · parent

Because its primary focus is on redefining how dependencies are stored and accessed, rather than modifying the contents of these dependencies.

Useless files will still be there.

Also, when you create a Docker image, you avoid packing in dev tools that aren't absolutely essential (such as Yarn).

comment 3y ago · link · parent

If everyone used the `file` field, the world would be a better place, for sure.

comment 3y ago · link · parent

- Of course, this entails the risk of occasional breakage. But for 99% of modules, this has no impact at runtime.

- The patterns used to find files are specific enough to target only those files that are well known to be useless at runtime.

- The license texts of these libraries can be copied and merged into a main LICENSE file.

- Have you seen the number of modules installed by most major libraries? Making a pull request for each of them is humanly impossible and counter-productive. It's easier to use a simple script that releases dozens of MB in a few seconds.

7.

NPMprune: Remove unnecessary files from node_modules to optimize storage(github.com ↗)

44 points · by arthurwhite · 3y ago · 51 comments

8.

Gowww Router – A lightning fast and flexible HTTP router for Go(github.com ↗)

2 points · by arthurwhite · 9y ago · discuss