Do modern bundlers like Webpack or Rollup shake out only unused modules or are they capable of removing unused functions (or variables, classes) inside a module as well?
// src.js
export function unused() {}
export function used() {}
// bundle.js
// function unused() {} // <-- will this be included?
function used() {}
Searched on the subject but found nothing.
P.S. I've no experience with bundlers (other than zero-config Parcel) but I make the library that requires the answer to this question.