Skip to content

Commit

Permalink
Import date-fns functions from their separate files. Avoids Webpack i…
Browse files Browse the repository at this point in the history
…mporting everything causing bloat.
  • Loading branch information
Dan Searle committed Nov 23, 2018
1 parent a2591c4 commit 2409f9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/x-teaser-timeline/src/lib/date.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { format, isAfter, differenceInCalendarDays, subMinutes } from 'date-fns';
// TODO: import from main date-fns entry point once ft-app is no longer using Webpack 1.
import differenceInCalendarDays from 'date-fns/difference_in_calendar_days';
import format from 'date-fns/format';
import isAfter from 'date-fns/is_after';
import subMinutes from 'date-fns/sub_minutes';

/**
* Takes a UTC ISO date/time and turns it into a ISO date for a particular timezone
Expand Down

0 comments on commit 2409f9c

Please sign in to comment.