Skip to content

当使用enhanceApp.js并添加基本的代码后,无法渲染html文件 #2675

@cmlanche

Description

@cmlanche

System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 10.13.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 86.0.4240.111
Edge: Not Found
Firefox: Not Found
Safari: 13.0.4
npmPackages:
@vuepress/core: 1.7.1
@vuepress/theme-default: 1.7.1
vuepress: ^1.7.1 => 1.7.1
npmGlobalPackages:
vuepress: Not Found

enhanceApp.js的内容如下:

export default ({
  Vue, // VuePress 正在使用的 Vue 构造函数
  options, // 附加到根实例的一些选项
  router, // 当前应用的路由实例
  siteData, // 站点元数据
  isServer // 当前应用配置是处于 服务端渲染 或 客户端
}) => {
  router.beforeEach((to, from, next) => {
  })
}

当删除enhanceApp.js文件或者里面不写任何代码,能够正常生成html

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

What is expected?

能够正常将markdown文件渲染成html

What is actually happening?

assets的资源文件都生成了,比如css、img、js,一个HTML都没有生成,生成的日志中,没有出现success rendering html

Other relevant information

  • Output of npx vuepress info in my VuePress project:

[email protected] docs:build /Users/chengming/Documents/好未来/轻舟/docs
vuepress build .

wait Extracting site metadata...
tip Apply theme @vuepress/theme-default ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...

✔ Client
Compiled successfully in 18.36s

✔ Server
Compiled successfully in 14.53s

wait Rendering static HTML...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions