webpack 4.x版本在解析.vue文件所遇到的坑
You may need an appropriate loader to handle this file type.

使用vue-loader版本解析出现错的情况

当vue-loader版本为15.0.0的时候需要在webpack.config.js文件中加入以下代码

另一种解决办法 下载一个低于15.0.0版本的vue-loader
npm uninstall vue-loader 卸载vue-loader
npm install vue-loader@14.9.0 安装14.9.0版本的vue-loader
本人用的是第一种方式解决的
vue-loader官网传送门
网友评论