Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Import模式后,框架无法使用的问题 #199

Closed
cavencj opened this issue Oct 23, 2024 · 1 comment
Closed

使用Import模式后,框架无法使用的问题 #199

cavencj opened this issue Oct 23, 2024 · 1 comment

Comments

@cavencj
Copy link
Member

cavencj commented Oct 23, 2024

image

import  * as DC from @dvgis/dc-sdk’
DC.ready().then(()=>{})
@cavencj
Copy link
Member Author

cavencj commented Oct 23, 2024

该问题由于ESM增强了对于Import的模块无法从重写的设置,目前解决方案是复制一份DC出来 即 window.DC = Object.create(DC)
这是架构的缺陷, 在 v4.0.0架构中已经规避了这个问题,无需再次复制

@cavencj cavencj changed the title 使用Import 模式后,框架无法使用的问题 使用Import模式后,框架无法使用的问题 Oct 23, 2024
@cavencj cavencj closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant