I've been looking at the agadoo package that tries to determine if a package is treehshakable.
Looking at the code, this is the bit where it decides the answer
const nodes = ast.body.filter(node => {
return node.type !== 'ImportDeclaration';
});
return {
shaken: nodes.length === 0
};
So if I have something like an enum, which rollup will compile to a var then this will fail treeshaking.
Is this a good way of determining if a package is treeshakable?