The http request path is incorrect after vue-cli is packaged.

the vue I use is above 2.5.This is

db.jsonstatic

onLoginhttpgetdb.json

vue-cli

npm run buildgithubhttp404

configured in webpack.dev.conf.js.

ask the great god for advice, the problem is very urgent! Thank you

May.07,2021

your api requests are configured in dev-server during the development phase. These APIs do not exist after packaging. You need to start another node service and put it on the cloud


is BASE_URL matched


where do you put your server? What's the address?

< hr >

this block only configures several api, using devserver in dev.conf, but these
clipboard.png

do not exist in pure static resources after build deployment.

with Xia Bing
your knowledge of API starts the Node service on Synchronize during dev, so you can request it, but in the actual project, you don't have these addresses after packing, so you still have to open a service, whether it's Node or something else


.

, I don't understand the difference between dev and build

build is followed by a static file, and there is no dev Server

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b698-2bae4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b698-2bae4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?