The CJS output is a bit large when building the library #442
Replies: 3 comments 3 replies
-
Can not reproduce it. And you should specify
Excluding the time consumed by DTS files generation:
The time consumed by DTS files generation is just the time consumed by tsc execution, which takes a very long time, so the overall build time consumption is not significantly improved. In addition, since the generated DTS file of tsup is bundle DTS implemented by rollup-plugin-dts, the structure and time consumption is different from which of Rslib do that generate bundleless DTS by Typescirpt compiler API. And we are exploring a fast type generation solution based on isolated declarations. |
Beta Was this translation helpful? Give feedback.
-
|
之所以感觉没有速度上的提升,主要是在 |
Beta Was this translation helpful? Give feedback.
-
反复多次执行 |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When building AutoStore, the output sizes of the
cjsandesmproducts were compared to those generated bytsup. The results are as follows:tsupOutput:The sizes of the
cjsandesmoutputs are similar, but there is a significant difference in the output sizes ofrslib:rslibOutput:cjsandesmoutputs fromrslibare 65 KB and 53 KB, respectively, with thecjsoutput being nearly 9.8 KB larger than theesmoutput.tsupis run beforerslib, the second build attempt will result in an error.tsup.You can find the reproducible project here.
在构建AutoStore时,输出
cjs和esm产物,对比tsup的产物大小对比如下:tsup产物如下:cjs和esm产物大小基本一致,但是rslib的产物则差距较大:rslib产物如下:rslib的cjs和esm产物分别是65K和53K,cjs产物比esm大了近9.8K。tsup构建后再调用rslib构建时,第二次调用时会构建出错。tsup并没有提升的样子以上重现工程在这里
Beta Was this translation helpful? Give feedback.
All reactions