-
Notifications
You must be signed in to change notification settings - Fork 206
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
d3-interpolate 未提供 CJS 产物 #1282
Comments
@xiaoiver I added to package.json: I get an error: In @antv/g-base 0.5.12, the major version of the d3-interpolate dependency has been raised from 1 to 3. Package.json says "type": "module". @antv/g-base is compiled with typescript under commonjs so everything breaks. Please, can you elaborate on how to fix this? |
I will try to fork Then remove But I found g2plot has dependency of |
But I found all the d3 packages already moved to ESM module. So it seems impossible to fork all these d3 packages. I will try to find a better solution from Next.js docs. |
@xiaoiver I have created a simple project. https://github.com/EvgeniyBudaev/remix-ant/blob/main/app/routes/index.tsx
|
@xiaoiver Victory charts "solved it" with https://www.npmjs.com/package/victory-vendor (More info at https://formidable.com/blog/2022/victory-esm/). |
之前升级到了 3.x 版本,为了解决 snyk 问题。
main
指向了 ESM 版本:https://github.com/d3/d3-interpolate/blob/main/package.json#L28
2.x 倒是提供了:https://github.com/d3/d3-interpolate/blob/df0475ae37eb410e82b6f6ea667a81dec83a71b0/package.json#L18
导致 next.js 中使用报错:
ant-design/ant-design-charts#1802
如果不想退回到 2.x 版本,应该只能 fork 一份自己发布了。
The text was updated successfully, but these errors were encountered: