Open wojtekmaj opened 9 months ago
rimraf
itself is only 271 KiB. The main culprit is the glob
package (which is minipass
-based).
In my opinion, it doesn't matter which package is at fault. At the end of the day, all that matters is that installing rimraf
adds 4 MB to your node_modules
, and it does have a native replacement.
Does Nolyfill do a compatibility check? With Node.js supporting fs.glob
and fs.globSync
now it might be worth doing this.
Could also look into tackling https://github.com/SukkaW/nolyfill/issues/59 for when ESM-CJS sync interop becomes stable
For the record, they will not be dropping glob
any time soon.
In Node.js v14.14.0,
fs.rm
andfs.rmSync
was added. It's a built-in module that removes files and directories. Therecursive
option is used to remove directories and their contents.rimraf
is still WIDELY used, for no apparent reason.Each copy takes a whopping 3.38 MB.