zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.61k stars 284 forks source link

npx ssr build --html 编译出错 #317

Closed tianbaolin closed 9 months ago

tianbaolin commented 9 months ago

使用 npx ssr build --html构建时 爆出错误 :

Generating html file...                                                                                                  14:03:21
The argument 'id' must be a non-empty string. Received ''

生成html文件失败了。追踪了一下错误,原来是html.js 这个文件里面有这样一行代码:

const { h, Fragment } = await import(loadModuleFromFramework('vue'))

我是用的react框架,怎么执行到这儿来了。把上面代码loadModuleFromFramework方法的传参vue改为react就生成html成功了。能这样改吗?更好的解决方案是啥?

zhangyuang commented 9 months ago

support ssr build --html in react by ssr@6.2.67