ice icon indicating copy to clipboard operation
ice copied to clipboard

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

Open kchjxxgh opened this issue 4 years ago • 4 comments

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

kchjxxgh avatar May 27 '21 05:05 kchjxxgh

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

ClarkXia avatar May 27 '21 05:05 ClarkXia

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

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

kchjxxgh avatar May 27 '21 06:05 kchjxxgh

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

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

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

imsobear avatar May 27 '21 07:05 imsobear

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

563316158 avatar Apr 19 '22 09:04 563316158