title: JSDoc does not work in local package in a Lerna monorepo project using webpack dev server but works when released to package registry
body: <p>Github Project repo:
  <a href="https://github.com/Fralleee/lerna-intellisense-jsdoc-vscode" rel="nofollow noreferrer">https://github.com/Fralleee/lerna-intellisense-jsdoc-vscode</a></p>
  
  <p>I have a monorepo project with two packages (Web &amp; Api), these are linked using lerna. The Web-project imports the Api-package and the Api-requests are documented using JSDoc. </p>
  
  <p>The documentation gets loaded perfectly if the Api-package is released and imported from NPM.
  <img src="https://i.imgur.com/OTsKSuE.png" alt="working example"></p>
  
  <p>However if it is run locally via lerna &amp; webpack devserver the documentation is lost and only available in the local code (in the Api-folder).
  <img src="https://i.imgur.com/svVXc9o.png" alt="not working"></p>
  
  <p>I have tried writing the documentation using modules, namespaces and searching for different types of solutions but none seem to work.</p>
  
  <p>The JSDoc and function:</p>
  
  <pre><code>/**
   * Get comments from jsonplaceholder API
   * @namespace API
   * @module
   * @param {GetCommentsRequestExample} input PostId
   * @returns {Promise.&lt;GetCommentsResponseExample&gt;} Array of comments
   */
  export const getComments = input =&gt; apiGet('https://jsonplaceholder.typicode.com/comments', input, GetCommentsRequest, GetCommentsResponse)
  </code></pre>
  
  <p>I can't figure out why the JSDoc works when the package is released but not when run locally.</p>
  
  <hr>
  
  <p><strong>EDIT after 2 hours of extra testing</strong></p>
  
  <p>I export everything using an index-file in the Api-package. This index file imports everything from the package and then exports it, kind of like a single point of entry.</p>
  
  <p>If I define the function and JSDoc inside this index-file directly the JSDoc is available to other packages, even when run locally. </p>
  
  <p><a href="https://i.stack.imgur.com/hhBe1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hhBe1.png" alt="two different approaches"></a></p>
  
  <p>So it seems to be an issue with export -> import -> export again that messes up the JSDoc. This is obviously not a solution since the Api-package has too much code to fit into a single file.</p>