【问题标题】:vuepress dev not rendering locallyvuepress dev 没有在本地渲染
【发布时间】:2019-11-29 14:11:25
【问题描述】:

我有这个 Vuepress 项目 https://github.com/hanxue/wujiquan-vuepress 发布在 enter link description here 上。目录结构和config.js 运行良好。

但是在我的本地机器上,当我运行 yarn run build,相当于 vuepress dev docs 时,页面无法正确呈现。

生成静态网站虽然有效

yarn run build
python -m http.server -d docs\.vuepress\dist 8080

环境

"vuepress": "^1.0.0-alpha.24"
node: v10.16.0

【问题讨论】:

    标签: vuepress


    【解决方案1】:

    这类似于https://github.com/vuejs/vuepress/issues/1935?

    index.html 中的 CSS 和 JS 文件的路径是绝对路径(开始 带 /),所以使用文件协议查看 index.html 不起作用 (您需要将其托管在服务器上,以便使用 HTTP 协议)。

    【讨论】:

      猜你喜欢
      • 2021-01-09
      • 2019-08-09
      • 2018-12-23
      • 2017-04-28
      • 2019-01-17
      • 1970-01-01
      • 2022-11-29
      • 1970-01-01
      • 2020-10-12
      相关资源
      最近更新 更多