Open SandZn opened 1 year ago
Meet the same question. Ncc always ignore process.env.NODE_ENV == production
, and build all.
+1
Tree shaking would be fantastic.
I have noticed that if i import from a package like this:
import {find as event_find} from "event";
The whole package gets bundled. All the methods that I am not using from the 'event' package are getting bundled too.
Hi, is there any tree-shaking strategy in ncc, like what bundlers do on front-end applications? I wonder how do you deal with the dynamic "require" while compiling. Thank you.