You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use cdn to introduce vue3 and vue-router4 to reduce the size of the package, but I keep reporting errors, but it's okay to use vue2 and vue-router3.
#3587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
With vue3, introduce the following in the < head > of index.html: < script src= "...vue @ 3.0.5/dist/vue.global.js" > < / script >. < script src= "... vue-router@4.0.3/dist/vue-router.global.js" > < / script >.
Then configure in webpack.base.conf.js. Externals: {. 'vue': 'Vue' 'vue-router': 'VueRouter' }.
What is expected?
reduce the size of the package
What is actually happening?
I want to use cdn to introduce vue3 and vue-router4 to reduce the size of the package, but I keep reporting errors, but it's okay to use vue2 and vue-router3.
Use @ vue/cli 4.5.6.
With vue3, introduce the following in the < head > of index.html:
Version
3.5.2
Reproduction link
[https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPCFET0NUWVBFIGh0bWw XG48aHRtbD5cbiAgPGhlYWQ XG4gICAgPG1ldGEgY2hhcnNldD1cInV0Zi04XCI XG4gICAgPG1ldGEgbmFtZT1cInZpZXdwb3J0XCIgY29udGVudD1cIndpZHRoPWRldmljZS13aWR0aCxpbml0aWFsLXNjYWxlPTEuMFwiPlxuICAgIDx0aXRsZT7opb/mioDmnK88L3RpdGxlPlxuICAgIDwhLS0gYnVpbHQgZmlsZXMgd2lsbCBiZSBhdXRvIGluamVjdGVkIFRPRE8gQ0RO5LyY5YyWIC0tPlxuICAgIDxsaW5rIHJlbD1cInN0eWxlc2hlZXRcIiB0eXBlPVwidGV4dC9jc3NcIiBocmVmPVwiaHR0cDovL3VucGtnLmNvbS92aWV3LWRlc2lnbi9kaXN0L3N0eWxlcy9pdmlldy5jc3NcIj5cblxuICAgIDxzY3JpcHQgc3JjPVwiaHR0cHM6Ly91bnBrZy5jb20vdnVlQDMuMC41L2Rpc3QvdnVlLmdsb2JhbC5qc1wiPjwvc2NyaXB0PlxuICA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9zY3JpcHQ XG5cbiAgICA8c2NyaXB0IHR5cGU9XCJ0ZXh0L2phdmFzY3JpcHRcIiBzcmM9XCJodHRwOi8vdW5wa2cuY29tL3ZpZXctZGVzaWduL2Rpc3QvaXZpZXcubWluLmpzXCI PC9zY3JpcHQ XG5cbiAgPC9oZWFkPlxuICA8Ym9keT5cbiAgICA8ZGl2IGlkPVwiYXBwXCI PC9kaXY XG4gIDwvYm9keT5cbjwvaHRtbD5cbiJ9)
Steps to reproduce
Use @ vue/cli 4.5.6.
With vue3, introduce the following in the < head > of index.html: < script src= "...vue @ 3.0.5/dist/vue.global.js" > < / script >. < script src= "... vue-router@4.0.3/dist/vue-router.global.js" > < / script >.
Then configure in webpack.base.conf.js. Externals: {. 'vue': 'Vue' 'vue-router': 'VueRouter' }.
What is expected?
reduce the size of the package
What is actually happening?
I want to use cdn to introduce vue3 and vue-router4 to reduce the size of the package, but I keep reporting errors, but it's okay to use vue2 and vue-router3.
Use @ vue/cli 4.5.6.
With vue3, introduce the following in the < head > of index.html:
< script src= ".vue @ 3.0.5/dist/vue.global.js" > < / script >.
< script src= "... vue-router@4.0.3/dist/vue-router.global.js" > < / script >.
Then configure in webpack.base.conf.js.
Externals: {.
'vue': 'Vue'
'vue-router': 'VueRouter'
}.
Then report an error:
Ncaught TypeError: Cannot read property 'version' of undefined.
(version = Vue.version.split ('.') .map (Number)).
And.
Dom.js:2 Uncaught TypeError: Cannot read property 'prototype' of undefined.
At Object. < anonymous > (dom.js:2)
The text was updated successfully, but these errors were encountered: