Skip to content

Conversation

@sparklinm
Copy link
Contributor

@sparklinm sparklinm commented Jul 14, 2021

ES6 模块 tree shake 的实现,同时这里也尝试进行了 commonjs 的 tree shake。一个完整的 tree shake 过程分为以下两步:

  1. 跨文件分析导出模块是否被导入(已经实现)。
  2. 分析未被导入的导出模块是否在本文件内部使用(简单实现),但可以借助 terser 工具处理。

(类似于webpack 的 usedExports)

@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2021

Codecov Report

Merging #174 (95c2cbd) into master (c981924) will not change coverage.
The diff coverage is n/a.

❗ Current head 95c2cbd differs from pull request most recent head 29e2ef1. Consider uploading reports for the commit 29e2ef1 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #174   +/-   ##
=======================================
  Coverage   90.28%   90.28%           
=======================================
  Files          65       65           
  Lines        1390     1390           
  Branches      385      385           
=======================================
  Hits         1255     1255           
  Misses        112      112           
  Partials       23       23           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c981924...29e2ef1. Read the comment docs.

@Genuifx
Copy link
Contributor

Genuifx commented Mar 29, 2022

ref #212

@Genuifx Genuifx closed this Mar 29, 2022
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

Successfully merging this pull request may close these issues.

3 participants