-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Sorry if this is a trivial question/if this isn't the correct avenue, but is there any way to remove timezones and locales that are unused? My team and I only need to determine the time in the America/New York timezone, but it seems this library is pulling in packages related to every other available timezone/locale.
Here is how we're currently using the library:
import tz from 'timezone'
const getESTHours = (date) => {
const US = tz(require('timezone/America'))
const currentESTHour = US(date, 'America/New_York', '%H')
return parseInt(currentESTHour, 10)
}
And here's a screenshot of our bundle analysis, where the timezone module has contributed to a huge percentage of our bundle size.
We figured Webpack's tree shaking feature with UglifyJsPlugin would have automatically removed them if they were unused, but we wanted to drop a note here just in case anyone else has run into this before.
Any help would be super appreciated! ✊
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
