Home >Web Front-end >JS Tutorial >How to deal with file path errors after Vue packaging
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 locationJust 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!