From 27e5c6baea6d71ac020fede1dacc451905b9099e Mon Sep 17 00:00:00 2001 From: lizhihua <275091674@qq.com> Date: Thu, 25 May 2023 13:39:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=98=E9=87=8F=20libName=20=E6=98=AF?= =?UTF-8?q?=E4=B8=AD=E6=A8=AA=E7=BA=BF=E5=AD=97=E7=AC=A6=EF=BC=8Cdemo=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=AF=BB=E5=8F=96=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@vue/cli-service/lib/commands/build/demo-lib-js.html | 2 +- packages/@vue/cli-service/lib/commands/build/demo-lib.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@vue/cli-service/lib/commands/build/demo-lib-js.html b/packages/@vue/cli-service/lib/commands/build/demo-lib-js.html index 5ae658ca35..0505a3af5d 100644 --- a/packages/@vue/cli-service/lib/commands/build/demo-lib-js.html +++ b/packages/@vue/cli-service/lib/commands/build/demo-lib-js.html @@ -7,5 +7,5 @@ <% } %> diff --git a/packages/@vue/cli-service/lib/commands/build/demo-lib.html b/packages/@vue/cli-service/lib/commands/build/demo-lib.html index f6513ecfde..4e6c26b7d4 100644 --- a/packages/@vue/cli-service/lib/commands/build/demo-lib.html +++ b/packages/@vue/cli-service/lib/commands/build/demo-lib.html @@ -15,13 +15,13 @@ <% if (htmlWebpackPlugin.options.vueMajor === 3) { %> Vue.createApp({ components: { - demo: <%- htmlWebpackPlugin.options.libName %> + demo: globalThis['<%- htmlWebpackPlugin.options.libName %>'] } }).mount('#app') <% } else { %> new Vue({ components: { - demo: <%- htmlWebpackPlugin.options.libName %> + demo: globalThis['<%- htmlWebpackPlugin.options.libName %>'] } }).$mount('#app') <% } %>