Vue cli project, what is the problem with the picture path after build?

1. Build the project using vue init webpack-simple, and the directory structure is as follows

2.

introduces the image
3 in the components of vue. After the project is deployed, because the project is placed under the domain name http. Com / static, the path of the image is wrong. How to solve it?

Mar.17,2021

assetsPublicPath:'. /'


assetsPublicPath:'. /'

utils.js

if (options.extract) {
      return ExtractTextPlugin.extract({
        use: loaders,
        fallback: 'vue-style-loader',
        publicPath:'../../'
      })
    } else {
      return ['vue-style-loader'].concat(loaders)
    }

webpack.base.conf

{
   test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
   loader: 'url-loader',
   options: {
     limit: 10000,
     name: utils.assetsPath('img/[name].[hash:7].[ext]'),
     outputPath: process.env.NODE_ENV === 'production' ? '../' : ''
  }
},

you can see how to configure web pack to physically disappear the picture, and packaging it into bace64 can also reduce the number of connections.

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-1bf7450-32051.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-1bf7450-32051.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?