antvis/G6

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


Hi @kingyue737, Please star this repo if you find it useful! Thanks :star:! 你好 @kingyue737。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!

posted by github-actions[bot] over 1 year ago

感谢你的 PR https://github.com/antvis/G6/pull/5161 ,我们会在近期发布新版本包

posted by Aarebecca over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests