3 ms·
In a limited way due to side effects from the require function. Reading that rant, the author did not seem to take much time to understand the rationale behind
by wffurr 2y ago
In a limited way due to side effects from the require function.
Reading that rant, the author did not seem to take much time to understand the rationale behind ES modules: “ yet for some completely unclear reason, ESM proponents decided to remove that property” is just pure ignorance.
- jampekka 2y ago> In a limited way due to side effects from the require function. 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.