Vue-cli 3.0 releases the packaging of pictures in npm vue package css

rt. Background-image is used in
style.

a {
display: inline-block;
background-image: url("../assets/img/editor.png");
background-repeat: no-repeat;
width: 30px;
height: 30px;
border: 5px solid -sharpfff;
background-size: 380px 60px;
overflow: hidden;
text-indent: 110%;
&:hover {
  background-position-y: -40px;
}
  }

config.vue.js change publicPath to dist

module.exports = {
  lintOnSave: false,
  publicPath: "/dist/",
  css: {
    extract: false
  }
}

but after release, after npm install

clipboard.png
cannot get the picture.
Project address

Jun.17,2022

read it wrong. If you use a component, you need to transfer your picture to base64 or make it an online address. The relative path cannot be found when the component is used.

  • Initialize project problems with vue-cli

    * * set up a vue project according to a tutorial when npm install stops here for a long time, it doesn t move * * **vue-demonode_modules800120M,17000 vue** then the node.exe process accounts for 25% CPU, my computer CPU4 core, the process can not...

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