【发布时间】:2018-10-02 17:36:56
【问题描述】:
我无法让我在 Vue 中构建的网页在服务器上运行。我使用vue-build prod 构建了产品。我使用vue init bootstrap-vue/webpack my-project 构建了页面。
现在只有页脚可见。我已经上传了 dist 文件夹的内容。页面为:http://thegraph.es/dist/
【问题讨论】:
我无法让我在 Vue 中构建的网页在服务器上运行。我使用vue-build prod 构建了产品。我使用vue init bootstrap-vue/webpack my-project 构建了页面。
现在只有页脚可见。我已经上传了 dist 文件夹的内容。页面为:http://thegraph.es/dist/
【问题讨论】:
因为你所有的文件都指向根目录。
设置您的基本 url 或将所有文件从您的 dist 文件夹移动到您的根目录。
vue.config.js
module.exports = {
baseUrl: './',
//...
}
【讨论】: