antvis/G6


The issue has been closed
ESbuild 警报 duplicates an earlier case clause #5200
kingyue737 posted onGitHub
Describe the bug
在使用vite构建时esbuild会报警:
(esbuild plugin) [esbuild] (.nuxt/dist/server/_nuxt/electronic-372bd534.js:31248:13) This case clause will never be evaluated because it duplicates an earlier case clause
原因是下面的switch
中出现了两次相同的case
,应当移除第二个空的case:
https://github.com/antvis/G6/blob/9e461adc0656d76cd2848bb027174e3b3fd1f150/packages/pc/src/graph/controller/event.ts#L91 https://github.com/antvis/G6/blob/9e461adc0656d76cd2848bb027174e3b3fd1f150/packages/pc/src/graph/controller/event.ts#L98
fixed by #5161
Your Example Website or App
ignore
Steps to Reproduce the Bug or Issue
在任意vite项目中引入g6 v4, build一下就会报警告
Expected behavior
不报错
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response