Open vamshi-rafcos opened 2 years ago
The date-fns package referenced under date-fns-tz/esm is not a bug caused by esm
Same issue for me when using import format from 'date-fns-tz/esm/format'
Looks like some date-fns-tz
esmodules are importing non-esmodules in some instances.
Importing as import { zonedTimeToUtc } from 'date-fns-tz';
gives the same error about CJS modules.
i am using date-fns and also for time zones date-fns-tz. But when using formatInTimeZone method , angular giving CommonJS or AMD dependencies can cause optimization bailouts warning as depends on date-fns/cloneObject.
i am importing like using suggestion given by date-fn-tz
import formatInTimeZone from 'date-fns-tz/esm/formatInTimeZone';
but other methods in date-fns-tz working fine likeutcToZonedTime,toDate
,it doesn't giving any warningsangular@14 node@16.15