What is the way to judge the local environment of vue?
This article mainly introduces the relevant knowledge of "what is the way to judge the local environment of vue". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "what is the way to judge the local environment of vue" can help you solve the problem.
Judge the local environment
You only need to install the plug-in cross-env under windows
Npm I cross-env first
Then modify the package.json
Just modify the configuration of dev
You can judge that the environment sets a dynamic proxy.
Determine whether the environment is online or local let development=process.env.NODE_ENV = = 'development'? True: false; 's content on "how to judge the local environment of vue" ends here. Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.