Tooling concepts

Tree shaking and module side effects

Try the free JavaScript compiler

Tree shaking is a build optimization that removes code when static analysis can establish that it is not needed. ES module imports and exports provide useful static structure. Do not label every module side-effect-free when some initialize essential application behavior. Example type: javascript. Context: build-lab. Expected observation: module initialized 7. See local fixture evidence.

Formal Syntax & Structure

javascript syntaxjavascript
import { used } from "./effects.mjs";console.log(used());

Working Example

Example Snippetjavascript
import { used } from "./effects.mjs";console.log(used());
JavaScript Reference