vue播放MP4视频报错Module parse failed: Unexpected character ‘ ‘

17 篇文章 0 订阅

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用内容,这个报错是因为vue-loader版本过高,需要下载低版本的vue-loader来解决。你可以使用以下命令来安装低版本的vue-loader: npm i vue[email protected] --save-dev 同时,你可以参考这篇文章来获取更多信息:https://www.freesion.com/article/87781082538/ 对于引用内容,报错"Module parse failed: Unexpected token (95:59) You may need an appropriate loader to handle this file type."是因为在你安装layui时遇到了问题。这个错误通常发生在模块解析阶段,可能是因为缺少适当的加载器来处理该文件类型。你可以尝试安装相应的加载器来解决这个问题。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* [Module parse failed: Unexpected token (135:0) You may need an appropriate loader to handle this file](https://blog.csdn.net/YI_Zyd/article/details/115726208)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Module parse failed: Unexpected token](https://download.csdn.net/download/weixin_38535221/14886682)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值