The first common path problem on the web,
Dist /index.html is empty and there is an error. The file cannot be loaded to the resource. If you look at the file path, you will find that there is a problem.
Solutions:
Find the config/index.js file,
Line 39 build:{assetsPublicPath:'/',}Copy the code
Dot assetsPublicPath: /
The assetsPublicPath property specifies the root directory for compiling and publishing, ‘/’ refers to the root directory of the project, ‘./ ‘refers to the current directory.
Second pit: Route history mode.
When the route is in history mode, the packaged file will not be accessible to the server. Repackage the mode:’history’ comment
This is not to say that this mode cannot be turned on, it needs to work with the backend Settings, see the HTML5 History mode for details