After the official template of element-ui is changed to the official template of vue, static resources cannot be requested.

element-ui official template is relatively old, so I try to rebuild the code with the official template of vue. After completion, I found that requests for static resources all failed. In the past, I visited http://127.0.0.1:8081/src/assets/img/generally.jpg on the browser to respond to the image and replace it with the official template of vue. The request is changed to the http://127.0.0.1:8081/src/assets/img/generally.jpg-sharp/, page and goes back to the home page.

what kind of configuration affects this? Should I add such an address to / src/assets/img/generally.jpg, under the route, but the old template is OK, it should not be such a problem.

Apr.15,2021

solved it by yourself. There is a difference between assets and static files. The template configuration file given by ele-ui is simple. I don't know if it is because of the problem of the webpack version or the configuration file, which leads to the random storage of my pictures without reporting an error.
solution, check the difference between assets and static.

Menu