Y
Hacker News
new
|
ask
|
show
|
jobs
by
z3t4
2368 days ago
Can you give an example of a bundler that removes dead code and not just minifies it? Dead code removal in JS is a bit tricky, unless we are only talking about code after return statements and other low hanging fruit.
1 comments
kaoD
2368 days ago
IIRC as long as you use ES modules, tree-shaking is trivial?
EDIT: not that trivial
https://webpack.js.org/guides/tree-shaking/
link
z3t4
2368 days ago
Hmm. Now that we have async functions meybe we could also add the pure keyword in order to help optimizations.
link
EDIT: not that trivial https://webpack.js.org/guides/tree-shaking/