title: date-fns 2 - can't get tree-shaking to work
body: <p>I'm having trouble figuring how <a href="https://github.com/date-fns/date-fns" rel="nofollow noreferrer">date-fns</a> v.2 tree-shaking feature works...</p>
  
  <p>To help me with it, I've made a really simple project using:</p>
  
  <ul>
  <li><code>date-fns 2.1.0</code></li>
  <li><code>webpack 4.39.3</code></li>
  <li><code>typescript 3.6.2</code></li>
  </ul>
  
  <p>the test contains 2 files, one acting as the "library", the other acting as the code to run, and it is as simple as...</p>
  
  <pre><code>import ParseDate from './parse-date'
  
  const parse = new ParseDate();
  const result = parse.getExpirationDate({ months: 3 });
  
  console.log(result);
  </code></pre>
  
  <p>but the issue is, though I'm only asking to work with 6 libraries using the tree-shaking use</p>
  
  <pre><code>import { addYears, addMonths, addWeeks, addDays, addHours, addMinutes } from 'date-fns';
  </code></pre>
  
  <p>from their <a href="https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md" rel="nofollow noreferrer">docs</a>:</p>
  
  <pre><code>// Without tree-shaking:
  import format from 'date-fns/format'
  import parse from 'date-fns/parse'
  
  // With tree-shaking:
  import { format, parse } from 'date-fns'
  </code></pre>
  
  <p>webpack is bundling the entire date-fns library, being the result of the 2 files, <strong>726Kb</strong> !!</p>
  
  <pre><code>&gt; npm run build
  
  &gt; date_fns_test@1.0.0 build C:\Users\balexandre\date_fns_test
  &gt; tsc &amp;&amp; webpack
  
  Hash: 419a712549fc2309f21e
  Version: webpack 4.39.3
  Time: 820ms
  Built at: 2019-09-09 17:27:36
      Asset     Size  Chunks             Chunk Names
  bundle.js  726 KiB    main  [emitted]  main
  Entrypoint main = bundle.js
  chunk {main} bundle.js (main) 441 KiB [entry] [rendered]
      &gt; ./src/index.js main
   [./src/index.js] 410 bytes {main} [depth 0] [built]
       single entry ./src/index.js  main
   [./src/parse-date.js] 1.27 KiB {main} [depth 1] [built]
       cjs require ./parse-date [./src/index.js] 6:35-58
       + 212 hidden modules
  </code></pre>
  
  <p><strong>What am I missing?</strong> ...must be a simple thing but I've run out of ideas :(</p>
  
  <p>The project can be <a href="https://github.com/balexandre/parse-fns-treeshaking" rel="nofollow noreferrer">found on GitHub</a> for easy review (and git pull) :)</p>