What is the purpose of dev.env.js and prod.env.js configuration files?

I"m taking over a Vue.js project, just at the front end, but there is a folder config with the following files:

excuse me, can these three configuration files be deleted? Looks like it has something to do with node.js.

dev.env.js:

"use strict"
const merge = require("webpack-merge")
const prodEnv = require("./prod.env")

module.exports = merge(prodEnv, {
  NODE_ENV: ""development"",
  
})

prod.env.js:

"use strict"
const MODEL = require("../static/config.js")
const pro= {
  NODE_ENV: ""production""
}
module.exports =Object.assign({}, pro,MODEL)    

will webpack initialize Vue projects create them automatically?

Feb.28,2021

all vue projects you build with vue-cli template have these files and belong to webpack-related configuration.
dev.env.js file is a variable of the development environment, and npm run dev command. Webpack.dev.conf can find out where this variable is introduced in the build file.
prod.env.js file is a variable of the production environment, and the npm run build command. Under the build file, webpack.prod.conf can find out where this variable was introduced;


can't, these are configuration files. Dev.env.js is the variable of the development environment, and prod.env.js is the variable of the production environment.

Menu