Home > Web Front-end > JS Tutorial > What should I do if the home page has a white screen after vue build is packaged?

What should I do if the home page has a white screen after vue build is packaged?

php中世界最好的语言
Release: 2018-05-17 17:00:25
Original
2312 people have browsed it

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 of

js, and the css cannot be loaded.

2. Solution

Find index.js in the config folder and open it as

setsPublicPath: ' /'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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template