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

@antv/data-set打包后文件过大如何解决 #104

Open
lynnReno1994 opened this issue Dec 15, 2020 · 8 comments
Open

@antv/data-set打包后文件过大如何解决 #104

lynnReno1994 opened this issue Dec 15, 2020 · 8 comments

Comments

@lynnReno1994
Copy link

每次打包都会提示[BABEL] Note: The code generator has deoptimised the styling of /Users/lynn/workspace/DeepBlue/DBG_AD/AdvertWEB/web_monitor/node_modules/_@[email protected]@@antv/data-set/build/data-set.js as it exceeds the max of 500KB.

请问有什么好的解决办法么 ?

  • Link:

  • Platform:

  • Mini Showcase(like screenshots):

@zhangfangbiao
Copy link

同样556k

@flyingcrp
Copy link

实际是730k

@hustcc
Copy link
Member

hustcc commented Mar 16, 2021

目前 data-set 的代码组织方式,没法发挥 webpack 的按需打包优势,只能重构,重新组织才行。

是否有愿意来搞起这个事情的同学?

@caoxuccc
Copy link

caoxuccc commented May 6, 2021

多处引用,累计太大

@GTuooa
Copy link

GTuooa commented Nov 5, 2021

没有cdn吗?

@xyy94813
Copy link

xyy94813 commented Jan 4, 2022

source-map-explorer 分析得
默认依赖文件 node_modules/@antv/data-set/build/data-set.js 占用 618.37kb.
该文件未压缩。

可以尝试:

// import DataSet from '@antv/data-set'
import DataSet from '@antv/data-set/lib'

这么使用后我这边降到了 56.79kb

@ufoozhenghao
Copy link

同问有CDN或者什么方式压缩体积吗

@vaynevayne
Copy link

我的情况: 我只用到少数几个 transform, 其实就是几个工具函数, 但是却安装了全家桶 660kb
有大佬有空把这些 tranform 单独提取出来作为一个单独的包发布吗?
有的话请艾特我

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants