antvis/G6

SyntaxError: The requested module '/node_modules/.vite/deps/@antv_g6.js?v=75648447' does not provide an export named 'default' #6485

Sloth9527 posted onGitHub

Describe the bug / 问题描述

image

vue3 按照文档引入后 报错

image

image

image

https://codesandbox.io/p/live/c35cbe0d-2f51-413a-bac4-e27679b440da

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


没有发现你所描述的问题,Vue 使用 G6 可以参考:https://codesandbox.io/p/sandbox/g6-vue-xzf7pg?file=%2Fsrc%2FApp.vue%3A9%2C1

posted by Aarebecca 6 months ago

没有发现你所描述的问题,Vue 使用 G6 可以参考:https://codesandbox.io/p/sandbox/g6-vue-xzf7pg?file=%2Fsrc%2FApp.vue%3A9%2C1

用vue3却不用vite是真没想到,那就是vite需要怎么配置能支持g6 https://codesandbox.io/p/devbox/goofy-elion-29lqrv

posted by Sloth9527 5 months ago

@Sloth9527 我们的开发环境也是有用到 vite 的,且也存在其他的 vue 用户,并没有反映你提到的问题。建议检查自身开发环境。

posted by Aarebecca 5 months ago

没有发现你所描述的问题,Vue 使用 G6 可以参考:https://codesandbox.io/p/sandbox/g6-vue-xzf7pg?file=%2Fsrc%2FApp.vue%3A9%2C1

用vue3却不用vite是真没想到,那就是vite需要怎么配置能支持g6 https://codesandbox.io/p/devbox/goofy-elion-29lqrv

请问解决了吗?我也是同样的问题 同样的引入方式💦

posted by jannicaTan 3 months ago
posted by JiaQi-0827 about 1 month ago

试试自己安装 dagre,

vite.config.js

  resolve: {
      alias: {
        dagre: 'dagre/dist/dagre.min.js',
      },
    },
posted by gigizhaoo 25 days ago

Fund this Issue

$0.00
Funded

Pull requests