From ccde0a7dece4c07634ec8582e920e48798f673e2 Mon Sep 17 00:00:00 2001 From: Ling Z <771152260@qq.com> Date: Mon, 8 May 2023 10:13:33 +0800 Subject: [PATCH] Update rollup.md --- docs/web/rollup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/web/rollup.md b/docs/web/rollup.md index 648ee2a..d955a5d 100644 --- a/docs/web/rollup.md +++ b/docs/web/rollup.md @@ -55,7 +55,7 @@ rollup main.js --file bundle.js --format umd --name "myBundle" # Tree-Shaking 优化 -通过`依赖分析`,将实际`未使用的代码剔除`。粒度到`函数`级别。 +通过`依赖分析`,Rollup 将实际`未使用的代码剔除`。粒度到`函数`级别。 > `Tree-Shaking` 也叫`live code inclusion`,是一种消除无效代码的方式。根据项目依赖抽离模块内容的 `AST抽象语法树`,然后 `摇动语法树` 以删除所有无效代码,过程类似于 `标记-清除垃圾收集算法`。 @@ -67,4 +67,4 @@ ajax(...); // 对比在commonjs中,只能整体引入模块 const utils = require('./utils'); utils.ajax(...); -``` \ No newline at end of file +```