1.vue项目打包
1.vue.config.js文件在module.exports={}下加入关键代码
module.exports = {
/**
* You will need to set publicPath if you plan to deploy your site under a sub path,
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then publicPath should be set to "/bar/".
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: './',
outputDir: 'dist',
assetsDir: '',
lintOnSave: false,
productionSourceMap: false,
devServer: {
port: 8090,
open: true,
overlay: {
warnings: false,
errors: true
},
}
2.在package.json文件 加入打包命令
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode prod",