Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ahzhou
· 2y ago · 0 comments
Conditionally yes. There are many libraries that cannot be tree shaken for various reasons. Libraries typically need to stick to a subset of full JS to ensure that the code can be statically analyzed.
Comments
[–]
throwAGIway
2y ago
Basically the only forbidden thing is dynamically calculating import paths, or dynamically generating the module.exports object.