使用vue-cli3.x创建项目运行后页面出现一片空白:
vue.runtime.esm.js?2b0e:619 [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.config.js文件中配置别名
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
} // 别名配置
}
看了很多博客说改下别名重启后就恢复正常了,重启后依然报错,
解决方案:
在vue.config.js文件下添加一句话即可解决
runtimeCompiler: true, //加入内容