<h1 dir="auto">Bug report</h1>




<p dir="auto"><strong>What is the current behavior?</strong><br>
Some destructured assignments are getting rewritten with invalid syntax... the = and : to rename are in the wrong order.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
I'm not sure how to get this to happen outside of my app, but I have a component that does something like:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { DataURIs } from '../constants';

const { BLANK_IMAGE } = DataURIs;

function test (data = {}) {
	const {
		src = BLANK_IMAGE,
	} = data;
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">DataURIs</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../constants'</span><span class="pl-kos">;</span>

<span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-c1">BLANK_IMAGE</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-v">DataURIs</span><span class="pl-kos">;</span>

<span class="pl-k">function</span> <span class="pl-en">test</span> <span class="pl-kos">(</span><span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
	<span class="pl-k">const</span> <span class="pl-kos">{</span>
		src <span class="pl-c1">=</span> <span class="pl-c1">BLANK_IMAGE</span><span class="pl-kos">,</span>
	<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">data</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">and <code class="notranslate">src</code> becomes something like <code class="notranslate">{src = constants_BLANK_IMAGE : src_constants_BLANK_IMAGE}</code>... which is backwards.</p>






<p dir="auto"><strong>What is the expected behavior?</strong><br>
no syntax error.</p>


<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:  5.24.0<br>
Node.js version: 15.8.0<br>
Operating System:<br>
Additional tools:</p>
<p dir="auto">webpack 5 contains <code class="notranslate">types.d.ts</code> , but seems that missing lot of declaration from <code class="notranslate">@types/webpack@4.x.x</code></p>
<p dir="auto">for example , how to implement a custom Loader with declaration ?</p>
<p dir="auto"><code class="notranslate">@types/webpack@4.x.x</code> define <code class="notranslate">webpack.loader.Loader</code> but webpack 5 have no similiar declaration</p>