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

vite分支使用yarn安装后,Dashboard的图表无法显示 #3

Closed
hxj0x opened this issue Mar 22, 2022 · 3 comments
Closed

vite分支使用yarn安装后,Dashboard的图表无法显示 #3

hxj0x opened this issue Mar 22, 2022 · 3 comments

Comments

@hxj0x
Copy link

hxj0x commented Mar 22, 2022

image

@iceqing
Copy link
Owner

iceqing commented Mar 24, 2022

目前vite对于dynamic require of xxx支持不是特别好,目前暂未发现较好的解决方案,暂时决定等后续amis支持esm后再进行支持vite。

类似问题:vitejs/vite#5308 , 但是提供的解决方案vite-plugin-commonjs对amis不生效

同时为了加快编译,master分支webpack已支持HMR功能。
第一次启动后,如果更改amis代码,一般都会在2s内完成编译,欢迎试用。

@duqingyu
Copy link

大佬 现在vite有继续研究吗,我也是遇到这个问题,试了尤大的方案集成monaco-editor后还是报这个错

@iceqing
Copy link
Owner

iceqing commented Jul 17, 2022

@hxj0x 这个问题已经修复了,可以尝试最新vite分支。

由于amis 2.0已经支持了esm,但是2.0的amis对chart的实现仍然有一些bug。
我已经给amis官方提了个PR,参考 baidu/amis#4904

不过我临时利用patch-package在本项目修复了该问题,目前可以使用vite分支来验证。

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

3 participants