Remove dependency on rifraf
and make 11ty 18% smaller
#3622
Labels
enhancement: favorite
Vanity label! The maintainer likes this enhancement request a lot.
enhancement
housekeeping
Is your feature request related to a problem? Please describe.
I love 11ty, it's fast and lightweight, but it's still relatively big - my simple blog has 50MB of files in
node_modules/
, which is insane!Simplifying the dependency tree would help reduce the risk of supply chain attacks, makes installs faster and is better for the environment. I'd be happy to work on this, but I think it would require some coordination to make we don't break semver.
Describe the solution you'd like
Remove outdated dependencies like 'polyfills' and other long dependency chains in-line with 11ty's minimum node version of 18.
npmgraph is a great site to visualize the dependency tree, I see a few areas with easy wins.
@11ty/recursive-copy
depends on this package 'rimraf', which adds 4MB of dependencies, just to delete directories (this has been built in since NodeJS 12, which is way below the minimum Node version 18 required for 11ty today)Fixing this should just be swapping to
fs.rmdir
in11ty/recursive-copy
This is the single largest dependency chain in 11ty, and also looks like it brings in the most unrelated packages. Considering how simple it looks to remove, I think it would definitely be worth trying to get rid of.
I've already done this so far:
object.entries
to make 11ty leaner eleventy-posthtml-urls#1Describe alternatives you've considered
This has a similar effect to #3360, but doesn't require a minimum NodeJS bump.
Additional context
No response
The text was updated successfully, but these errors were encountered: