Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] echarts cdn方式下,vite打包 后 有重复代码 #20629

Open
superchangme opened this issue Dec 30, 2024 · 3 comments
Open

[Bug] echarts cdn方式下,vite打包 后 有重复代码 #20629

superchangme opened this issue Dec 30, 2024 · 3 comments
Labels
bug missing-demo The author should provide a demo. pending We are not sure about whether this is a bug/new feature. waiting-for: author

Comments

@superchangme
Copy link

superchangme commented Dec 30, 2024

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/handbook/zh/basics/release-note/v5-upgrade-guide/

Steps to Reproduce

vue3 + vite 项目 使用cdn方式引入echarts.esm.js

    rollupOptions: {
      external: ["vue",'echarts','echarts/lib/echarts'],

Current Behavior

使用cdn方式引入echarts.esm.js,
但是打包时还是会有echarts的内容,
全部都是lib模块下的。有无办法优化?
image

Expected Behavior

期望打包后不包含echarts lib

Environment

node 18
 vite 5.4.8
 echarts 5.4.3

Any additional comments?

No response

@echarts-bot echarts-bot bot added the missing-title This issue is missing a descriptive title. label Dec 30, 2024
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2024

This comment has been minimized.

@superchangme superchangme changed the title [Bug] [Bug] echarts cdn方式下,vite打包 后 有重复代码 Dec 30, 2024
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Dec 30, 2024
@echarts-bot echarts-bot bot reopened this Dec 30, 2024
@echarts-bot echarts-bot bot removed the missing-title This issue is missing a descriptive title. label Dec 30, 2024
Copy link

echarts-bot bot commented Dec 30, 2024

@superchangme It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] In echarts cdn mode, there is duplicate code after vite packaging

BODY

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/handbook/en/basics/release-note/v5-upgrade-guide/

Steps to Reproduce

The vue3 + vite project uses cdn to introduce echarts.esm.js

    rollupOptions: {
      external: ["vue",'echarts','echarts/lib/echarts'],

Current Behavior

Use cdn to introduce echarts.esm.js,
But there will still be echarts content when packaging.
All are under the lib module. Is there any way to optimize it?
image

Expected Behavior

It is expected that echarts lib will not be included in the package

Environment

node 18
 vite 5.4.8
 echarts 5.4.3

Any additional comments?

No response

@plainheart plainheart added the missing-demo The author should provide a demo. label Dec 31, 2024
Copy link

echarts-bot bot commented Dec 31, 2024

@superchangme Please provide a demo for the issue either with Official Editor, CodePen, CodeSandbox or JSFiddle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug missing-demo The author should provide a demo. pending We are not sure about whether this is a bug/new feature. waiting-for: author
Projects
None yet
Development

No branches or pull requests

2 participants