Skip to content

'document is not defined' in next.js #130

@haiifeng

Description

@haiifeng

在nextjs项目中使用该组件,会报'document is not defined' in '/@uiw/react-baidu-map/lib/cjs/utils'。
加了'if (process.browser)'条件后,报' _interopRequireDefault is not a function' in 's@uiw\react-baidu-map\lib\cjs\APILoader\index.js'
所以现在有点不知所措了,大佬有什么解决办法来兼容ssr后端渲染的不?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions