Treeshaking and performance
Tree shaking can dramatically impact your bundle size, we strongly recommend importing only what you need!
Tree shaking is available throughout the SDK.
Everything can be very granularly imported to ensure you only import what you need.
Actions
Without Tree-Shaking
import {Resize} from "@cloudinary/url-gen/actions/resize";
Resize.scale()
Resize.crop()
With Tree-Shaking
import {scale, crop} from '@cloudinary/url-gen/actions/resize';
scale()
crop()
Qualifier Values
Without Tree-Shaking
import {Format} from "@cloudinary/url-gen/qualifiers/format";
Format.png()
Format.jpg()
With Tree-Shaking
import {jpg, png} from "@cloudinary/url-gen/qualifiers/format";
png()
jpg()
Not sure what these terms mean?
Visit SDK Terminology for more information
Visit SDK Terminology for more information