I’ve spend some time on consuming electrode component from demo folder instead of src, and here is the example component:
https://github.com/didi0613/oss-electrode-component-css-modules-example
Within the demo folder, we are using electrode-demo-index for demoing the component. However, it is not working with Server side rendering. The reason behind is that electrode-demo-index has codemirror as its dependency, when server side rendering enabled, it will looking for window navigator which is only valid when client side comes in.
- seems electrode explore is inactively maintained right now, and we have plans to migrate to
bitsrc, do we still need to change from consuming component fromsrcfolder todemofolder? - if we still wants to use
electrode-demo-index, we will need to re-write part of it to make it work with ssr?