Skip to content

Commit

Permalink
docs(cn): fix incorrect translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yucohny committed Dec 18, 2023
1 parent 02ef8ad commit f1c4e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/guides/tree-shaking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ T> 注意,所有导入文件都会受到 tree shaking 的影响。这意味着

**`sideEffects` 更为有效** 是因为它允许跳过整个模块/文件和整个文件子树。

`usedExports` 依赖于 [terser](https://github.com/terser-js/terser) 检测语句中的副作用。它是一个 JavaScript 任务而且不像 `sideEffects` 一样简单直接。并且由于规范认为副作用需要被评估,因此它不能跳过子树/依赖项。尽管导出函数能正常运行,但 React 的高阶函数在这种情况下会出问题
`usedExports` 依赖于 [terser](https://github.com/terser-js/terser) 检测语句中的副作用。它是一个 JavaScript 任务而且不像 `sideEffects` 一样简单直接。并且由于规范认为副作用需要被评估,因此它不能跳过子树/依赖项。尽管导出函数能正常运行,但 React 的高阶组件在这种情况下会出问题

让我们来看一个例子:

Expand Down

0 comments on commit f1c4e38

Please sign in to comment.