<blockquote>
<p dir="auto">Issue originally made by Ryan Duffy (ryan.duffy)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.11.4</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="es2015 preset"><pre class="notranslate"><code class="notranslate">es2015 preset
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default () =&gt; ({
  x: ({x}) =&gt; {}
});"><pre class="notranslate"><code class="notranslate">export default () =&gt; ({
  x: ({x}) =&gt; {}
});
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">With the above code, babel transpiles to a closure without <code class="notranslate">module.exports</code>. Seems to be unique to the combination of exporting an arrow function that returns an object containing a key whose value is an arrow function where the first arg is deconstructed with a key of the same name.</p>
<ul dir="auto">
<li>If the keys are different (<code class="notranslate">x: ({y}) =&gt; {}</code>) or the deconstructed key is renamed (e.g. <code class="notranslate">x: ({x: y}) =&gt; {}</code>), it doesn't reproduce.</li>
<li>If you use <code class="notranslate">function</code> in place of either arrow function, it doesn't reproduce.</li>
<li>If you store the closure into a local variable and then export that, it doesn't reproduce.</li>
</ul>
<p dir="auto">Reproducible via the babel repl as well</p>
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jprichardson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jprichardson">@jprichardson</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.x</li>
<li><strong>Node version:</strong> 5.3.0</li>
<li><strong>npm version:</strong> 3.7.1</li>
</ul>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default (onClick) =&gt; (&lt;div onClick={ () =&gt; onClick(text) } &gt;&lt;/div&gt;);"><pre class="notranslate"><code class="notranslate">export default (onClick) =&gt; (&lt;div onClick={ () =&gt; onClick(text) } &gt;&lt;/div&gt;);
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">You'll notice an <code class="notranslate">export</code> at the bottom that didn't get transpiled.</p>
<p dir="auto">Sorry, regarding Babel "version", wasn't sure which version to put since there are so many libraries. I'm using babel-plugin-transform-es2015-arrow-functions@6.5.2.</p>