You are using the runtime-only build of Vue where the template c
F12控制台报错信息:
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.
报错截图:

原因简述:
在项目配置的时候,默认 npm 包导出的是运行时构建,即 runtime 版本,不支持编译 template 模板。意思是说,你使用的是仅运行时的版本的模板。。。
【1】最简单解决方法:
在项目根目录添加:vue.config.js文件,
内容为:
【2】把main.js中的代码改成这样:
//----------------
版本:vue2、@vue/cli 4.5.13、node v16.13.0、npm 7.20.6、win10
扩展资料:百度查控制台的报错信息英文提示,有一堆。。。