You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught (in promise) Error: Dynamic require of "echarts" is not supported
at chunk-ACCAMVX6.js?v=64adb3e9:12:9
at Chart.js:106:91
at new Promise (<anonymous>)
at Chart.js:106:61
at async Promise.all (index 0)
vite 使用ESM 作为模块化方案,因此不支持使用require 方式来导入模块,我尝试过对于一般的require做转换为import使用(使用vite-plugin-commonjs插件),但是对于这种Dynamic require of "echarts"仍然支持不够好,期望官方能提供esm的包支持。
The text was updated successfully, but these errors were encountered:
是否关联于某个问题吗:
由于
Webpack
开发编译相对较慢,想用Vite
支持amis
(react-amis-admin )。但是由于
amis
未提供ems
版本编译包,导致部分功能会报错,比如iceqing/react-amis-admin#3该报错示例代码可参考react-amis-admin
vite
分支预期的解决方案:
类似于redux分别提供
cjs
、esm
的包,或者lodash-es等,提供单独的
esm
依赖。其他可接受方案:
提供amis的vite示例
任何附加信息:
vite
使用ESM
作为模块化方案,因此不支持使用require
方式来导入模块,我尝试过对于一般的require
做转换为import使用(使用vite-plugin-commonjs插件),但是对于这种Dynamic require of "echarts"
仍然支持不够好,期望官方能提供esm
的包支持。The text was updated successfully, but these errors were encountered: