首页 > 其他 > 详细

关于Vue警告

时间:2020-07-12 18:10:46      阅读:55      评论:0      收藏:0      [点我收藏+]

控制台出现报错:

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

翻译一下:  [Vue警告]:您正在使用Vue的仅运行时版本,而模板编译器不可用。 可以将模板预编译为渲染函数,也可以使用包含编译器的内部版本。

 

解决方法:

  配置项目,在项目根目录下建立一个 vue.config.js的文件

  文件内的代码如下:

1 module.exports = {
2     configureWebpack: {
3         resolve: {
4             alias: {
5                 ‘vue$‘: ‘vue/dist/vue.esm.js‘
6             }
7         }
8     }
9 }

  重启项目即可

关于Vue警告

原文:https://www.cnblogs.com/strongerPian/p/13289179.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!