Better HN
topnewbestaskshowjobs
Log inSign up

yabberdabbafoo

1 karma · joined Aug 6, 2020 (6y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

> If library authors make esm as a thin wrapper over cjs, won't it hinder tree shaking.

Correct. I wouldn't follow the article's advice wrapping ESM with CJS as it leads to larger bundles.

> Won't it cause degradation in behaviour?

For web apps - certainly. The forced sync behavior of CJS wouldn't be very noticeable for local applications however.