VUE报错You are using the runtime-only build of Vue where the template compiler is not available
报错信息
Failed to compile.
./src/views/home/login.vue
Module not found: Error: Can't resolve 'sass-loader'
解决方案
在vue项目下新建一个vue.config.js
文件内容为
module.exports = {
//Solution For Issue: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.
//zhengkai.blog.csdn.net
runtimeCompiler: true
}
重启项目后问题解决
最后
所参考的原文献的地址为:
VUE报错You are using the runtime-only build of Vue where the template compiler is not available