Conformity in the World Wide Web

✍️Theory
web-development
internet

Tree shaking

tree shaking: Use named imports instead of global imports

import { namedImport } from "../utils";

cherry-picking:

// This still pulls in all of lodash even if everything is configured right.
import { sortBy } from "lodash";

// This will only pull in the sortBy routine.
import sortBy from "lodash-es/sortBy";

Read this great article for more.

Code splitting

Only load files which are necessary on each route

Discuss on TwitterImprove this article: Edit on GitHub

Discussion


Explain Programming

André Kovac builds products, creates software, teaches coding, communicates science and speaks at events.