Skip to content

Commit 3ed9118

Browse files
author
zhangdong
committed
ast
1 parent 3b70c17 commit 3ed9118

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configure/engine.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ CICD
5050

5151
所有他是语义等价的最小表达
5252

53+
并且ast在工程化中起到了重要作用,例如在webapack.
54+
55+
* 在依赖解析阶段,根据ast导入导出节点,构建依赖图
56+
* 在代码转化阶段,例如es6转es5,babel就是通过ast解析,转换,生成来实现的
57+
* tree-shaking也是利用ast进行静态分析
58+
* UglifyJS也是利用ast进行代码压缩
5359
### 举例
5460
```js
5561
let a = 1

0 commit comments

Comments
 (0)