search

Home  >  Q&A  >  body text

javascript - There is a problem with the image path after webpack packaging

The homepage was originally opened at http://localhost:8080 port, and everything was normal. After webpack, the homepage directly referenced bundle.js, and the pictures on the homepage were not found.

The project file structure and webpack configuration are as shown

滿天的星座滿天的星座2754 days ago427

reply all(1)I'll reply

  • PHPz

    PHPz2017-05-19 10:33:50

    Try itpublicPath:"/dist/"改成publicPath:""

    reply
    0
  • Cancelreply