antvis/G6

Production Environment Error: Cannot read properties of undefined (reading 'Graph') #6512

hls-1992 posted onGitHub

Describe the bug / 问题描述

In DEV environment, everything is ok. In PROD environmnet, Cannot read properties of undefined (reading 'Graph')

No response

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

Just vue3 + vite import { Graph } from '@antv/g6'

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


vite 2.x version

posted by hls-1992 5 months ago

I created a vue app and used G6, and the built product worked without the problem you described. You can provide more information.

posted by Aarebecca 5 months ago

I created a vue app and used G6, and the built product worked without the problem you described. You can provide more information.

I think it is caused by the lower version vite(2.6)

posted by hls-1992 5 months ago

I created a vue app and used G6, and the built product worked without the problem you described. You can provide more information.

In vite 4.x version, everything is ok

posted by hls-1992 5 months ago

Hello! May I ask what caused this?

posted by penouc 5 months ago

Fund this Issue

$0.00
Funded

Pull requests