title: Are unreferenced default parameters automatically tree-shaken out by webpack?
body: <blockquote>
  <p>Obligatory apologies if this has been asked before, but I've been
  unable to find an answer online or in the webpack docs related to tree shaking.</p>
  </blockquote>
  <p>How does tree-shaking work with default parameters? For context: I'm specifically concerned with how the webpack implementation of tree-shaking handles default parameters.</p>
  <p>Given the following hypothetical application structure:</p>
  <pre><code>/
  |_ dependency/
  | |
  | |_ dependency.js
  | |_ moderatelyLargeFile.js
  |
  |
  |_src/
    |
    |_ application.js
    |_ someSmallFile.js
  </code></pre>
  <p>and the following code in each file:</p>
  <p><code>dependency.js</code></p>
  <pre><code>import moderatelyLargeFile from './moderatelyLargeFile.js';
  import { someParsingFunction1, someParsingFunction2 } from 'somewhere-else-dependency';
  
  export default function parseSomeFile(file = moderatelylargeFile) {
    let parsedResult = { ...someParsingFunction1(file), ...someParsingFunction2(file) };
    return parsedResult;
  }
  </code></pre>
  <p><code>application.js</code></p>
  <pre><code>import parseSomeFile from './dependency/dependency.js';
  import someSmallFile from './someSmallFile.js'
  let result = parseSomeFile(someSmallFile);
  // Do other application stuff with result
  </code></pre>
  <p>Would <code>moderatelyLargeFile.js</code> ever be bundled into the webpack build of <code>application.js</code>? Is webpack smart enough to know that the default parameter is never referenced because the single invocation provides that parameter? Or does the <code>moderatelyLargeFile.js</code> always get bundled regardless because it is part of the function definition?</p>