<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sorgloomer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sorgloomer">@sorgloomer</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.5.1</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
        plugins: ['transform-es2015-modules-amd']
    }"><pre class="notranslate"><code class="notranslate">{
        plugins: ['transform-es2015-modules-amd']
    }
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require(&quot;foo&quot;).bar;"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"foo"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">bar</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Trying to compile the above code with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var babel = require('babel-core');
console.log(babel.transform(
  'require(&quot;foo&quot;).bar;',
  { plugins: ['transform-es2015-modules-amd'] }
).code);"><pre class="notranslate"><code class="notranslate">var babel = require('babel-core');
console.log(babel.transform(
  'require("foo").bar;',
  { plugins: ['transform-es2015-modules-amd'] }
).code);
</code></pre></div>
<p dir="auto">results in this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: unknown: Property object of MemberExpression expected node to be of a type [&quot;Expression&quot;] but instead got null
    at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\definitions\index.js:101:13)
    at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\index.js:269:9)
    at NodePath._replaceWith (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\replacement.js:201:7)
    at NodePath._remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:55:10)
    at NodePath.remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:27:8)
    at PluginPass.CallExpression (C:\_temp\babel6-test\node_modules\babel-plugin-transform-es2015-modules-amd\lib\index.js:51:12)
    at NodePath._call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:74:18)
    at NodePath.call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:46:17)
    at NodePath.visit (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:104:12)
    at TraversalContext.visitQueue (C:\_temp\babel6-test\node_modules\babel-traverse\lib\context.js:156:16)"><pre class="notranslate"><code class="notranslate">TypeError: unknown: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
    at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\definitions\index.js:101:13)
    at Object.validate (C:\_temp\babel6-test\node_modules\babel-types\lib\index.js:269:9)
    at NodePath._replaceWith (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\replacement.js:201:7)
    at NodePath._remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:55:10)
    at NodePath.remove (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\removal.js:27:8)
    at PluginPass.CallExpression (C:\_temp\babel6-test\node_modules\babel-plugin-transform-es2015-modules-amd\lib\index.js:51:12)
    at NodePath._call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:74:18)
    at NodePath.call (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:46:17)
    at NodePath.visit (C:\_temp\babel6-test\node_modules\babel-traverse\lib\path\context.js:104:12)
    at TraversalContext.visitQueue (C:\_temp\babel6-test\node_modules\babel-traverse\lib\context.js:156:16)
</code></pre></div>
<p dir="auto">Maybe we could have an option to completely turn off treating <code class="notranslate">require</code> calls in es6 modules as imports</p>
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/greypants/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/greypants">@greypants</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.5.2</li>
<li><strong>Node version:</strong> 4.2.4</li>
<li><strong>npm version:</strong> 2.14.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="react"><pre class="notranslate"><code class="notranslate">react
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div label=&quot;foo&quot; label=&quot;label is duplicated&quot; /&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"foo"</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"label is duplicated"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span></pre></div>
<h3 dir="auto">Description</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div label=&quot;foo&quot; label=&quot;label is duplicated&quot; /&gt;
"><pre class="notranslate"><code class="notranslate">&lt;div label="foo" label="label is duplicated" /&gt;

</code></pre></div>
<p dir="auto">Will transpile to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="React.createElement('div', { label: '...', name: '...', label: '...' })"><pre class="notranslate"><code class="notranslate">React.createElement('div', { label: '...', name: '...', label: '...' })
</code></pre></div>
<p dir="auto">The duplicate definition of <code class="notranslate">label</code> on the object literal will will cause the following error in IE 10+</p>
<blockquote>
<p dir="auto">SCRIPT1046: Multiple definitions of a property not allowed in strict mode`</p>
</blockquote>
<p dir="auto">It'd be great to at least throw a warning, if not break transpiling altogether.</p>