jargon

Frontend & browser·Modules, bundling and the build

you added `"sideEffects": false` to the package and the bundle got noticeably smaller.

Side-effect-free module

Also calledsideEffects flag, pure module

A declaration that importing a module does nothing beyond defining its exports, so the bundler may drop it entirely when none are used. Without it, any import must be kept in case it registers a polyfill, sets a global, or injects a stylesheet — which is exactly what an imported CSS file does. Marking a package free of side effects when it is not produces missing styles and missing registrations that only appear in production builds.

Commonly confused with