Y
Hacker News
new
|
ask
|
show
|
jobs
by
ahzhou
722 days ago
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.
1 comments
throwAGIway
722 days ago
Basically the only forbidden thing is dynamically calculating import paths, or dynamically generating the module.exports object.
link