vue播放MP4视频报错Module parse failed: Unexpected character ‘ ‘
引用vue-video-player插件播放本地mp4视频,一直报错:Error in data(): “Error: Module parse failed: Unexpected character ’ ’You may need an appropriate loader to handle this file type, currently no loaders are configure
·
引用vue-video-player插件播放本地mp4视频,一直报错:
Error in data(): “Error: Module parse failed: Unexpected character ’ ’
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)”
后面在webpack.common.conf.js文件里写上这样一段话才能打包处理mp4视频文件:
{
test: /\.(mp4)(\?.*)?$/,
loader: 'file-loader',
options: { name: urlHash.parse('video/[name].[ext]'), limit: 10000 },
},```
更多推荐
已为社区贡献3条内容
所有评论(0)