After treatment vue packaged items cause css file references a static directory path unusual problem

Directory Structure

 

Logically, this call is not a local problem and no error message

 

Index.html when packaged access path and found there was a place repeated, surprise surprise no meaning without an accident (which I just want to say MMP)



Thoughts: I introduced the same path in the file path vue introduced with css Why right of the picture, but the css being given, there may be css done anything special to deal with it?

Solution Found build folder utils.js plus pubilcPath this parameter value pubilcPath note that according to your static file, usually introduced here will have a few a few ../ ../

 

Guess you like

Origin www.cnblogs.com/fczbk/p/12585398.html