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

Logo

前往低代码交流专区

更多推荐