konva + micro-app does not work normalcy.it only render a <div></div>

23 Views Asked by At

when i use micro-app(A micro front-end framework),react-konva does not work normalcy。it only render a 。

this is example: containers:https://github.com/Lpbzzz/box konva: https://github.com/Lpbzzz/konva-demo According to the micro-app documentation, there may be some useful information: https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/questions?id=_7%e3%80%81%e9%94%99%e8%af%af%e4%bf%a1%e6%81%af%ef%bc%9axxx-undefined

Reason:

In the sandboxed environment of a micro front-end, top-level variables do not leak to global variables.

For example, under normal circumstances, top-level variables defined via var name or function name () {} leak as global variables and are globally accessible via window.name or name.

However, in a sandboxed environment these top-level variables do not leak as global variables and window.name or name is undefined, causing problems.

0

There are 0 best solutions below