Production environment and development environment in vue

does the front end need to deploy the configuration of the production environment and the development environment when doing the vue project?

Jul.20,2021

needs
you can use process.env.NODE_ENV to distinguish


the most common thing to encounter is that the development environment comes with a built-in counter-generation, but the production environment of this thing is invalid and needs to be provided by external Server .

if you use vue-cli , the default is fine for basic simple projects.


of course, the interface address of the development environment is different from the production address

Menu