~/talk

Removing Dead Code from Runtime CSS Modules with webpack

TalkinRussianat HolyJS Piter 2019 · 2019-05-24..05-25· [css]
github:kisenka
slides:none on file

Shows a practical method to remove the CSS Modules runtime from bundles by statically mapping imported class names to their generated names and eliminating unused entries. Uses webpack parser hooks, css-loader messages via PostCSS, and a custom dependency/template to replace the import at compile time; includes a plugin+loader proof‑of‑concept that prunes dead selectors but notes it’s a raw demo needing extra edge‑case handling for complex dynamic usage.

AI-written summary · about

  1. 0:00Introduction
  2. 6:22Problem history
  3. 12:44Webpack requirements
  4. 23:02Collecting class data
  5. 36:49Final CSS values
  6. 51:17Linking CSS and JS
  7. 1:04:50Optimizing runtime
  8. 1:21:30Replacing objects
  9. 1:31:03Summary
~/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.