antvis / XFlow

React component for building interactive diagrams.
https://x6.antv.antgroup.com/xflow/guide/introduction
MIT License
564 stars 233 forks source link

support nextjs #419

Closed kemisstep closed 8 months ago

kemisstep commented 9 months ago

问题描述

ReferenceError: window is not defined

重现链接

ReferenceError: window is not defined

重现步骤

ReferenceError: window is not defined

预期行为

ReferenceError: window is not defined

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

已经使用: const XFlow = dynamic(() => import('@antv/xflow').then(({ XFlow }) => XFlow), { ssr: false } );

const XFlowCanvas = dynamic(() => import('@antv/xflow').then(({ XFlowCanvas }) => XFlowCanvas), { ssr: false } );

const CanvasMiniMap = dynamic(() => import('@antv/xflow').then(({ CanvasMiniMap }) => CanvasMiniMap), { ssr: false } );

const CanvasScaleToolbar = dynamic(() => import('@antv/xflow').then(({ CanvasScaleToolbar }) => CanvasScaleToolbar), { ssr: false } );

const CanvasSnapline = dynamic(() => import('@antv/xflow').then(({ CanvasSnapline }) => CanvasSnapline), { ssr: false } );

但仍然报错

xflow-bot[bot] commented 9 months ago

👋 @kemisstep

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.