In a limited way that covers something like 99.9% of CJS usage. Bundling is based on static analysis.
If by side effects you mean running code, not just declaring exports, ES6 import does these side effects too.
Thinking that CJS can't be used for static analysis or tree-shaking is the widest spread pure ignorance.
In a limited way that covers something like 99.9% of CJS usage. Bundling is based on static analysis.
If by side effects you mean running code, not just declaring exports, ES6 import does these side effects too.
Thinking that CJS can't be used for static analysis or tree-shaking is the widest spread pure ignorance.