antvis / data-set

state driven all in one data process for data visualization.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

lynnReno1994 opened this issue · comments

commented

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

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

  • Link:

  • Platform:

  • Mini Showcase(like screenshots):

同样556k

实际是730k

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

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

多处引用,累计太大

没有cdn吗?

commented

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

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

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