Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
459 views
in Technique[技术] by (71.8m points)

使用webpack(^4.44.2) 打包 vue3.0(^3.0.0-rc.1)问题

提示parseComponent undefined

image.png

尝试解决
看信息是@vue/component-compiler-utils问题,然后卸载重装最新版本(不行)
上网找呀找~~
发现有博客说没有vue-template-compiler了,改成@vue/compiler-sfc了?
image.png
博客链接:https://bbs.huaweicloud.com/blogs/183533
然后就屁颠颠跑去npm搜下 @vue/compiler-sfc
发现不知道怎么用。。。哈(⊙o⊙)…

疑问:vue-template-compiler无法编译vue3吗?

请问该如何解决?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

直接安装即可

yarn add @vue/compiler-sfc --dev

可以参考官方仓库的配置https://github.com/vuejs/vue-next-webpack-preview


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...