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 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 },
                },```

你可能感兴趣的:(js,vue,vue.js,音视频,webpack)