loadEnv is a tool function of vite

The loadEnv() function returns an object. This object is the environment variable in the .env.development file that is loaded according to the development mode or the production environment. There are some that come with the system and some that are handwritten by yourself.

loadEnv(1st parameter, 2nd parameter, 3rd parameter)  

Note: If the third parameter is an "" empty string, all environment variables will be displayed. The system comes with it + you can write it yourself.

           If the third parameter is omitted, only the variables created in the .env.development file will be displayed.

loadEnv (development module, the folder where the .env file is located, specify the environment variable prefix)

 

Guess you like

Origin blog.csdn.net/Frank_colo/article/details/133267914