Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

目前服务端渲染是否不支持Egg.js 2.0? #47

Closed
634750802 opened this issue Nov 25, 2017 · 1 comment
Closed

目前服务端渲染是否不支持Egg.js 2.0? #47

634750802 opened this issue Nov 25, 2017 · 1 comment

Comments

@634750802
Copy link

使用easywebpack直接生成的项目将egg升级到2.0.0后,服务端渲染时会500

// ext -> viewEngineName -> viewEngine
  async [RENDER](name, locals, options = {}) {
    // retrieve fullpath matching name from `config.root`
    const filename = await this.viewManager.resolve(name);
    options.name = name;
    options.root = filename.replace(path.normalize(name), '').replace(/[\/\\]$/, '');

    // get the name of view engine,
    // if viewEngine is specified in options, don't match extension
    let viewEngineName = options.viewEngine;
    if (!viewEngineName) {

这段代码报错:filename.replace is not a function

@hubcarl
Copy link
Collaborator

hubcarl commented Nov 27, 2017

@634750802 egg-webpack-vue 问题 已修复,目前是改成Promse方式,发的patch小版本,支持egg1 和 egg2, 专门的node8 await和async 改造会发一个major 大版本,也就是3.0.0,这个接下来统一改造。

@hubcarl hubcarl closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants