Reduce JavaScript Payloads With Tree Shaking
Fleeting- External reference: https://web.dev/reduce-javascript-payloads-with-tree-shaking/
Reduce JavaScript payloads with tree shaking
techniques to improve JavaScript performance. Code splitting, is one such technique that improves performance by partitioning application JavaScript into chunks, and serving those chunks to only the routes of an application that need them.
— https://web.dev/reduce-javascript-payloads-with-tree-shaking/
inclusion of code that’s never used. Tree shaking attempts to solve this problem.
— https://web.dev/reduce-javascript-payloads-with-tree-shaking/
Tree shaking is a form of dead code elimination. The term was popularized by Rollup, but the concept of dead code elimination has existed for some time
— https://web.dev/reduce-javascript-payloads-with-tree-shaking/
/ Import only some of the utilities!import { unique, implode, explode } from “array-utils”;
— https://web.dev/reduce-javascript-payloads-with-tree-shaking/
builds, this doesn’t change anything, as the entire module gets imported regardless. In production builds, webpack can be configured to “shake” off exports from ES6 modules that weren’t explicitly imported, making those production builds smaller.
— https://web.dev/reduce-javascript-payloads-with-tree-shaking/