SoFunction
Updated on 2025-04-05

Solve the problem that css reference background image cannot be displayed in the vuejs project

Solution: build->, modify: add

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

The above article solves the problem that the background image quoted by CSS in the vuejs project cannot be displayed is all the content shared by the editor. I hope it can give you a reference and I hope you can support me more.