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

CLI创建的Fusion Pro项目,开启SSR,访问失败 #4344

Open
kchjxxgh opened this issue May 27, 2021 · 4 comments
Open

CLI创建的Fusion Pro项目,开启SSR,访问失败 #4344

kchjxxgh opened this issue May 27, 2021 · 4 comments
Assignees
Labels

Comments

@kchjxxgh
Copy link

What is the current behavior? 发生了什么?

CLI新建的Fusion Pro项目,在开启SSR,并且修改router为browser之后,访问失败,Terminal显示:ReferenceError: document is not defined
具体异常日志如下:
image

What is the expected behavior? 期望的结果是什么?

Any additional comments? 相关环境信息?

  • ice.js Version:1.18
  • build.json Configuration
    { "plugins": [ [ "build-plugin-fusion", { "themePackage": "@alifd/theme-design-pro" } ], [ "build-plugin-moment-locales", { "locales": [ "zh-cn" ] } ] ], "ssr": true }
  • Node Version: 14.15.4
  • Platform: Windows 10
@ClarkXia
Copy link
Collaborator

Fusion Pro 中的图表依赖(bizCharts) 目前暂不支持 SSR 渲染

@kchjxxgh
Copy link
Author

Fusion Pro 中的图表依赖(bizCharts) 目前暂不支持 SSR 渲染

有什么办法让某一部分不参与SSR?类似于某VUE库里面的 https://quasar.dev/vue-components/no-ssr

@imsobear
Copy link
Collaborator

Fusion Pro 中的图表依赖(bizCharts) 目前暂不支持 SSR 渲染

有什么办法让某一部分不参与SSR?类似于某VUE库里面的 https://quasar.dev/vue-components/no-ssr

包一个组件应该就可以 @luhc228 可以了解下

@563316158
Copy link

解决了吗 我用 braft-editor 也遇到同样的问题 不知道怎么让它不参与SSR, 试了react-no-ssr、no-ssr等插件 问题还是在。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants