Skip to content

[Bug] VRender 依赖的 roughjs 库与 rolldown-vite 构建工具存在兼容性问题 #1975

@idleRain

Description

@idleRain

Version

1.22.2

Link to Minimal Reproduction

https://codesandbox.io/p/live/e3f41b14-7963-4ba8-8e63-8ce09d97a5ad

Steps to Reproduce

  1. 使用 rolldown-vite 创建一个 vue3 工程项目 "vite": "npm:rolldown-vite@7"
  2. 在页面中导入 import { ListTable } from '@visactor/vtable'
  3. 打开启动项目的终端工具,查看错误日志

Current Behavior

Error: Error during dependency optimization:

Build failed with 5 errors:

[MISSING_EXPORT] Error: "default" is not exported by "node_modules/.pnpm/roughjs@4.5.2/node_modules/roughjs/bundled/rough.js".
    ╭─[ node_modules/.pnpm/@visactor+vrender-kits@1.0.21/node_modules/@visactor/vrender-kits/es/render/contributions/rough/rough-arc.js:15:8 ]
    │
 15 │ import rough from "roughjs";
    │        ──┬──
    │          ╰──── Missing export
────╯

Node.js v24.4.0

Expected Behavior

顺利运行

Environment

- OS: Windows 10 21H2
- Browser: Chrome 134.0.6998.36(正式版本) (64 位)
- Framework: Vue@3.5.16
- Build Tool: rolldown-vite@7

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions