vue project using configuration files .env global environment variables

1, the file name

It must be named as follows:

.env global default configuration file, no matter what the environment will be loaded merger

Profiles in .env.development development environment

.Env.production configuration files in the production environment

2, the contents of the file

Attribute names must begin VUE_APP_, such as VUE_APP_XXX

 

3, the loaded file

Run different environments by using different commands

 

Guess you like

Origin www.cnblogs.com/icemargin/p/12652973.html