I use vue-cli to build the project, how to configure the online and developed domain name?

how to switch the online and offline domain name url and how to configure
config? clipboard.png
ask for answers

Mar.05,2021

define your domain name in dev.env.js and prod.env.js to
just quote the name directly in js


you can refer to this article, just like your problem, you can continue to communicate if you have any questions. the project built by vue-cli deals with requests for different domain names in different environments

Menu