This time I will bring you what to do with a white screen on the homepage after vue build is packaged. What are the precautions to solve the white screen on the homepage after vue build is packaged? The following is a practical case. Let’s take a look.
1. Problem description
The local vue project has no problem browsing on the server side, but after executing npm run build and packaging, the local preview is White screen. There are a lot ofjs, and the css cannot be loaded.
2. Solution
Find index.js in the config folder and open it assetsPublicPath: ' /'Change it to what it looks like in the box below.
Just execute npm run build again. I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website! Recommended reading:
How to extract project-related configuration files when vue-cli packages code
How to do it in node Compress and merge JS files
The above is the detailed content of What should I do if the home page has a white screen after vue build is packaged?. For more information, please follow other related articles on the PHP Chinese website!