After the vue was packaged, the image resources were obtained normally, but the video resources acquisition failed.

the vue project npm build is packaged and placed on the server through the nginx proxy, and the image resources are obtained normally, but the local MP4 video cannot be played. I can"t find the reason.

clipboard.png

clipboard.png

clipboard.png


clipboard.png

clipboard.png

May.12,2022

can't find your video. Have you packed your video file webpack? no, add

to the following paragraph.
{
                test: /\.(mp4)(\?.*)?$/,
                loader: 'url-loader',
                options: {
                  name:'audios/[name].[ext]',
                  limit:10
                }
            }   

  index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '', // 

is this the webpack configuration

for path problems, it's best to use relative path , because wwww.xxxx.com and www.xxx.com/xxx are different

.

use relative paths. Refer to this link:


you can use require () to introduce addresses to avoid not finding addresses due to configuration problems

:src="require('src')"

needs to modify the configuration of the webpack packaged media file.


have you solved your problem? I have encountered the same problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5465f-452aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5465f-452aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?