Home > Web Front-end > JS Tutorial > How to deal with file path errors after Vue packaging

How to deal with file path errors after Vue packaging

php中世界最好的语言
Release: 2018-03-28 09:52:55
Original
2088 people have browsed it

This time I will show you how to deal with file path errors after Vue packaging. What are the precautions for handling file path errors after Vue packaging? The following is a practical case, let's take a look.

Here is the project created by vue-cli as an example

1. The file path is incorrect

Find the index.js file in the config folder and modify the location

See clearly that it is build (there is also a dev above which is in the development environment) Configuration, no changes required) under assetsPublicPath: Change '/' to './'

2. BackgroundPictureIncorrect path

The path of background-img written in css is wrong. You need to find utils.js in the build folder and modify the location

Just add the fields in the red box.

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:

What are the problems with the vue+webpack packaging path

How to automatically obtain and automatically update cookies when they expire

The above is the detailed content of How to deal with file path errors after Vue packaging. 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