<h3 dir="auto">Version</h3>
<p dir="auto">2.6.14</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto">[https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPCFET0NUWVBFIGh0bWw XG48aHRtbD5cbiAgPGhlYWQ XG4gICAgPG1ldGEgY2hhcnNldD1cInV0Zi04XCI XG4gICAgPG1ldGEgbmFtZT1cInZpZXdwb3J0XCIgY29udGVudD1cIndpZHRoPWRldmljZS13aWR0aCxpbml0aWFsLXNjYWxlPTEuMFwiPlxuICAgIDx0aXRsZT7opb/mioDmnK88L3RpdGxlPlxuICAgIDwhLS0gYnVpbHQgZmlsZXMgd2lsbCBiZSBhdXRvIGluamVjdGVkIFRPRE8gQ0RO5LyY5YyWIC0tPlxuICAgIDxsaW5rIHJlbD1cInN0eWxlc2hlZXRcIiB0eXBlPVwidGV4dC9jc3NcIiBocmVmPVwiaHR0cDovL3VucGtnLmNvbS92aWV3LWRlc2lnbi9kaXN0L3N0eWxlcy9pdmlldy5jc3NcIj5cblxuICAgIDxzY3JpcHQgc3JjPVwiaHR0cHM6Ly91bnBrZy5jb20vdnVlQDMuMC41L2Rpc3QvdnVlLmdsb2JhbC5qc1wiPjwvc2NyaXB0PlxuICAgIDxzY3JpcHQgc3JjPVwiaHR0cHM6Ly91bnBrZy5jb20vdnVlLXJvdXRlckA0LjAuMy9kaXN0L3Z1ZS1yb3V0ZXIuZ2xvYmFsLmpzXCI PC9zY3JpcHQ XG5cbiAgICA8c2NyaXB0IHR5cGU9XCJ0ZXh0L2phdmFzY3JpcHRcIiBzcmM9XCJodHRwOi8vdW5wa2cuY29tL3ZpZXctZGVzaWduL2Rpc3QvaXZpZXcubWluLmpzXCI PC9zY3JpcHQ XG5cbiAgPC9oZWFkPlxuICA8Ym9keT5cbiAgICA8ZGl2IGlkPVwiYXBwXCI PC9kaXY XG4gIDwvYm9keT5cbjwvaHRtbD5cbiJ9](<a href="https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPCFET0NUWVBFIGh0bWw" rel="nofollow">https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPCFET0NUWVBFIGh0bWw</a> XG48aHRtbD5cbiAgPGhlYWQ XG4gICAgPG1ldGEgY2hhcnNldD1cInV0Zi04XCI XG4gICAgPG1ldGEgbmFtZT1cInZpZXdwb3J0XCIgY29udGVudD1cIndpZHRoPWRldmljZS13aWR0aCxpbml0aWFsLXNjYWxlPTEuMFwiPlxuICAgIDx0aXRsZT7opb/mioDmnK88L3RpdGxlPlxuICAgIDwhLS0gYnVpbHQgZmlsZXMgd2lsbCBiZSBhdXRvIGluamVjdGVkIFRPRE8gQ0RO5LyY5YyWIC0tPlxuICAgIDxsaW5rIHJlbD1cInN0eWxlc2hlZXRcIiB0eXBlPVwidGV4dC9jc3NcIiBocmVmPVwiaHR0cDovL3VucGtnLmNvbS92aWV3LWRlc2lnbi9kaXN0L3N0eWxlcy9pdmlldy5jc3NcIj5cblxuICAgIDxzY3JpcHQgc3JjPVwiaHR0cHM6Ly91bnBrZy5jb20vdnVlQDMuMC41L2Rpc3QvdnVlLmdsb2JhbC5qc1wiPjwvc2NyaXB0PlxuICAgIDxzY3JpcHQgc3JjPVwiaHR0cHM6Ly91bnBrZy5jb20vdnVlLXJvdXRlckA0LjAuMy9kaXN0L3Z1ZS1yb3V0ZXIuZ2xvYmFsLmpzXCI PC9zY3JpcHQ XG5cbiAgICA8c2NyaXB0IHR5cGU9XCJ0ZXh0L2phdmFzY3JpcHRcIiBzcmM9XCJodHRwOi8vdW5wa2cuY29tL3ZpZXctZGVzaWduL2Rpc3QvaXZpZXcubWluLmpzXCI PC9zY3JpcHQ XG5cbiAgPC9oZWFkPlxuICA8Ym9keT5cbiAgICA8ZGl2IGlkPVwiYXBwXCI PC9kaXY XG4gIDwvYm9keT5cbjwvaHRtbD5cbiJ9)</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Use @ vue/cli 4.5.6.</p>
<p dir="auto">With vue3, introduce the following in the &lt; head &gt; of index.html:<br>
&lt; script src= ".vue @ 3.0.5/dist/vue.global.js" &gt; &lt; / script &gt;.<br>
&lt; script src= "... vue-router@4.0.3/dist/vue-router.global.js" &gt; &lt; / script &gt;.</p>
<p dir="auto">Then configure in webpack.base.conf.js.<br>
Externals: {.<br>
'vue': 'Vue'<br>
'vue-router': 'VueRouter'<br>
}.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">expected  reduce the size of the package after build</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">Then report an error:<br>
Ncaught TypeError: Cannot read property 'version' of undefined.<br>
(version = Vue.version.split ('.') .map (Number)).<br>
And.<br>
Dom.js:2 Uncaught TypeError: Cannot read property 'prototype' of undefined.<br>
At Object. &lt; anonymous &gt; (dom.js:2)</p>
<p dir="auto">source:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;icon icon-{{test}}&quot;&gt;&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">icon icon-{{test}}</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">expect:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;icon icon-test&quot;&gt;&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">icon icon-test</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">result:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;icon icon- icon-test&quot;&gt;&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">icon icon- icon-test</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">here's the code:</p>
<p dir="auto"><a href="https://jsfiddle.net/10ons60y/" rel="nofollow">https://jsfiddle.net/10ons60y/</a></p>
<p dir="auto">是我的使用姿势不对吗  <em>(:3」∠)</em></p>