本文介绍了Laravel/Vuetify需要适当的加载器来处理此文件类型(mp4)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Laravel/Vue图像轮播,并且图像可以正常渲染,但是当我使用v-playback组件加载视频时,出现以下错误:

I'm currently working on a Laravel/Vue image carousel and the images are rendering fine but when I load the videos using the v-playback component, I get the following error:

Module parse failed: Unexpected character ' ' (1:0)
You may need an appropriate loader to handle this
file type, currently no loaders are configured to
process this file.

我试图寻找一个webpack.config.js,但是我得到的是一个只有以下内容的webpack.mix.js:

I've tried looking for a webpack.config.js but what I got is a webpack.mix.js which only has these:

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

我确实设法在node_modules的laravel-mix文件夹中找到一个webpack.config.js,但是我不确定那是否是我需要修补的那个.

I did manage to find a webpack.config.js in the laravel-mix folder in node_modules but I'm not sure if that's the one I need to be tinkering with.

推荐答案

确保您的网址指向视频所在的确切路径和文件扩展名.您的网址可能应该指向这样的内容:../public/videos/name_of_video.mp4

Ensure that your url is pointing to the exact path and file extension where the video is located . Your url should probably point to something like this ../public/videos/name_of_video.mp4

这篇关于Laravel/Vuetify需要适当的加载器来处理此文件类型(mp4)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 06:25
查看更多