cm0002@piefed.world to Programmer Humor@programming.devEnglish · 3 days agoYou typical Node projectlemmy.mlimagemessage-square68linkfedilinkarrow-up1579arrow-down18
arrow-up1571arrow-down1imageYou typical Node projectlemmy.mlcm0002@piefed.world to Programmer Humor@programming.devEnglish · 3 days agomessage-square68linkfedilink
minus-squarefahfahfahfah@lemmy.billiam.netlinkfedilinkEnglisharrow-up33·3 days agoAnd this is why tree shaking exists.
minus-squareNewDark@lemmings.worldlinkfedilinkarrow-up42·3 days agoIf you import 1% of your module code, you only compile the actual used code. Tree shaking is removing dead code paths that aren’t used.
minus-squareNat (she/they)@lemmy.blahaj.zonelinkfedilinkarrow-up14·2 days agoDead code elimination but with a different name for some reason
minus-squaresheepishly@fedia.iolinkfedilinkarrow-up1·2 days agoI feel like the end result of tree shaking would be the image here https://fedia.io/m/[email protected]/t/2547352/CSS-Gardening
And this is why tree shaking exists.
What is that?
If you import 1% of your module code, you only compile the actual used code. Tree shaking is removing dead code paths that aren’t used.
Ah ok gotcha
Dead code elimination but with a different name for some reason
Because we’re monkeys
We ARE all apes
It’s great when it works, yeah.
I feel like the end result of tree shaking would be the image here https://fedia.io/m/[email protected]/t/2547352/CSS-Gardening
Gotta fix that link
Works on my machine…