This release revisits the approach to CDN usage and introduces a new package, @date-fns/cdn and deprecates the date-fns CDN scripts. It allowed reducing the zipped package size from 5.83 MB down to 3.96 MB without introducing any breaking changes.
In v5.0.0-alpha.0 where CDN scripts are completely removed from date-fns the change is more significant and brings the zipped package size down to 2.89 MB.
It is just the first step in optimizing the package size. Expect further size reduction in the future v4 and v5 versions.
Changed
-
DEPRECATED: The
date-fnsCDN scripts are now deprecated and will be removed in the next major release. Please switch to the new@date-fns/cdnpackage for CDN usage. -
Removed CDN source maps to reduce the package size. If you rely on them, please switch to the new
@date-fns/cdnpackage that still includes them.