/dist
is just a default setting by VueJS. If you want to modify this : as the documentation from VueJS states :
Always use outputDir instead of modifying webpack output.path.
Create a vue.config.js
as an optional config file that will be automatically loaded by @vue/cli-service if it's present in your project root (next to package.json).
The file should export an object containing options:
// vue.config.js
module.exports = {
// options...
}
As otheres already stated in the comments, use outputDir
to specify the directory where the production build files will be generated in when running vue-cli-service build. Note the target directory will be removed before building (this behavior can be disabled by passing --no-clean
when building).
// vue.config.js
module.exports = {
outputDir : ''
}
/dist
folder is the default output dir of yourbuild
script. So, unless you modify the output dir in yourvue.config.js
, runningnpm run build
will create that folder for you, containing the production build. The contents of that dir are what you should deploy on a production server (after you build). And it is static. – tao