Rich Harris’ module bundler Rollup popularized an important feature in the JavaScript world: tree-shaking, excluding unused exports from bundles. Rollup depends on the static structure of ES6 modules (imports and exports can’t be changed at runtime) to detect which exports are unused.
Tree-shaking for webpack is currently in beta. This blog post explains how it works. The project we are going to examine is on GitHub: tree-shaking-demo
(0,obj.prop)()
not a method call?This blog post explores references, a mechanism used by the ECMAScript language specification to explain the difference between the following two expressions:
obj.prop()
(0, obj.prop)()
This blog post examines how Babel ensures that code it transpiles interoperates properly with normal CommonJS modules. Consult chapter “Modules” in “Exploring ES6” for more information on ES6 modules.
Babel’s loose mode transpiles ES6 code to ES5 code that is less faithful to ES6 semantics. This blog post explains how that works and what the pros and cons are (spoiler: normally not recommended).
This blog post explains how to configure how Babel 6 accesses its own helper functions and the ES6 standard library.
Babel 6 is much more configurable than Babel 5, but also more difficult to configure. This blog post gives tips.
The following ECMAScript proposal is at stage 3: “Trailing commas in function parameter lists and calls” by Jeff Morrison. This blog post explains it.
The ECMAScript proposal “String padding” by Jordan Harband & Rick Waldron is part of ECMAScript 2017. This blog post explains it.
The following ECMAScript proposal is at stage 4: “Object.values/Object.entries” by Jordan Harband. This blog post explains it.
This blog post explains the so-called TC39 process, which governs how ECMAScript features are designed, starting with ECMAScript 2016 (ES7).