~/talk

The art of tree-shaking

Talkat JSWorld Conference 2024 · 2024-02-28..03-01· [javascript, web-performance]
slides:none on file

Lucide Icons grows from 2019 to 29,400 icons and forces hard choices: ES module exports, declaring sideEffects: false (only when certain), and splitting large files so bundlers like Rollup and Vite can actually drop unused code. Concrete fixes: export individual functions instead of class wrappers, avoid import * as obj or huge JSON blobs, inject form inputs rather than one monolithic generator, use bundle visualizers, and watch CommonJS deps such as axios or moment that block tree‑shaking.

AI-written summary · about

  1. 0:00Introduction
  2. 1:29What is treeshaking
  3. 2:44How does it work
  4. 5:31What you need
  5. 14:15MPM packages
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.