vue项目部署

官网

https://cli.vuejs.org/guide/deployment.html#general-guidelines (本地访问)

首先在项目根目录下新建vue.config.js文件

该文件中的内容加入以下:

module.exports = {

    publicPath: './',

}

npm run build 打包成dist文件,然后可以直接运行index.html文件

### 阿里云服务器

在http-vhosts.conf下加入

#Rqueire local

Rquire all granted

### 其他配置 (路径别名等)

https://blog.csdn.net/qq_35167373/article/details/80671346?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param

较全

https://www.jb51.net/article/188130.htm

你可能感兴趣的:(vue项目部署)