You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundlers are not able to remove the temporal polyfill when it is imported but not used. This produces large bundles even when Temporal functionality is not used.
import{Temporal}from"@js-temporal/polyfill";exportfunctionusesTemporal(){// Anything with TemporalreturnTemporal.PlainDateTime.from("1970-01-01");}exportfunctionnotUsingTemporal(){return42;}
Now even if the user of the library only imports notUsingTemporal a large amount of code from the temporal polyfill is included anyway.
This is very important for library authors who want to use Temporal but allow it to be tree-shaken out if not necessary.
The text was updated successfully, but these errors were encountered:
Bundlers are not able to remove the temporal polyfill when it is imported but not used. This produces large bundles even when Temporal functionality is not used.
Now even if the user of the library only imports
notUsingTemporal
a large amount of code from the temporal polyfill is included anyway.This is very important for library authors who want to use
Temporal
but allow it to be tree-shaken out if not necessary.The text was updated successfully, but these errors were encountered: