What if the route cannot be switched after the vue is packaged?

after putting it on the server, click switch and report an error. Do you need to configure anything?

clipboard.png

:

clipboard.png

Mar.22,2021

index.js in the config folder as shown in the figure

 build:{
 assetsPublicPath: '/',
}

check to see if the assetsPublicPath path is'/'. If some are configured as'. /', you can't find the path.


what is the structure of the file you packaged? What is the configuration file? If


is not the root directory, try setting a base path, which corresponds to / dist

.
Menu