Vue-cli packages different environments according to different commands

first of all, let"s explain that Xiaobai has just come into contact with the vue-cli configuration project
my needs are as follows: different domain names can be packaged according to different command lines, that is, the corresponding domain name environment, but I found a lot of them on the Internet, but they can"t achieve my results. For example: https://juejin.im/post/5abef4.
, but it seems that the above can only package the interface domain name. My requirement is that all domain names should be changed. When I configure build according to the above tutorial, what I show here is not the expected result. I don"t know if there is something wrong with my configuration. Please take a look at my elder brother and thank you.


you can change the configuration. Change the domain name into variables and assign values to the environment that needs to be packaged. In this way, you can achieve the effect you said


what do you mean all domain names should be changed? Normally, you only need to configure the interface domain name. The domain name you visit will change if you put it in the corresponding server directory. This does not need to be changed.


I usually encapsulate axios, and write baseUrl in the encapsulated ajax function. When I go online, I change it to an online address


it is suggested to build a special api directory to encapsulate variables and interfaces, and then axios encapsulates request

.
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-1bf42b4-46467.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-1bf42b4-46467.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?