sideEffects

A package.json field that tells bundlers whether importing a file does anything besides defining exports.

In more detail

sideEffects: false lets a bundler drop any file whose exports are unused. Stylesheets do their work just by being imported, so they are listed as exceptions, for example sideEffects: ["*.css"].

Related terms

Taught in

References

Certification courses