Resource files are not generated in webpack,devServer memory so that resources cannot be accessed

webpack,devServer does not generate resource files in memory so that resources cannot be accessed

publicPath is configured as the root path, but devServer does not generate stripped resource files in memory, resulting in lack of access to picture and font resources

the files generated by local packaging separate the picture and font resources to the assets directory

devServerdevServerassetsdevServer:
devServerassets


clipboard.png I have a similar problem. The original configuration here is
name:'/ img/ [name]. [ext]', just change it to name: 'img/ [name]. [ext]'. Hope to help you


this depends on how your webpack-dev-server is configured. Refer to webpack template configuration in vue-cli2 . General


let path = require('path');
module.exports = {
  optimization:{
    splitChunks:{
      cacheGroups:{
        common:{
          chunks:'all',
          minChunks:2,
          minSize:0,
        },
      }
    }
  },
  devServer:{
    port:3000,
    progress:true,
    contentBase:'./dist',
    compress:true,
  },
  mode:'development',
  entry:{
    app:'./src/index.js',
    vendors:'./src/vendors.js',
  },
  output:{
    filename:'[name].js',
    path:path.resolve(__dirname,'dist'),
  },
  module:{
    rules:[{
      test:/\.(png|jpg|gif)$/,
      use:[ {loader:'file-loader',
            options:{
              name:'img/[name].[ext]'
            }}],
      
    }]
  }
}

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