Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cn): improve translations of tree-shaking #1881

Merged
merged 5 commits into from
Jan 16, 2024
Merged

docs(cn): improve translations of tree-shaking #1881

merged 5 commits into from
Jan 16, 2024

Conversation

Yucohny
Copy link
Member

@Yucohny Yucohny commented Dec 14, 2023

优化 tree shaking 翻译。

@Yucohny
Copy link
Member Author

Yucohny commented Dec 14, 2023

T> 在使用 tree shaking 时必须有 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin) 的支持,可以通过设置配置项 `mode: "production"` 启用它。如果没有这么做,那么需要手动引入 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin)

「如果没有这么做」,这个地方前文指的是开启生产环境,那没有这么做的意思应该是「使用开发环境」,可以确认一下(看看那个插件的介绍),然后把这个地方的翻译调整一下。

@Yucohny
Copy link
Member Author

Yucohny commented Dec 14, 2023

T> 在使用 tree shaking 时必须有 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin) 的支持,可以通过设置配置项 `mode: "production"` 启用它。如果没有这么做,那么需要手动引入 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin)

「如果没有这么做」,这个地方前文指的是开启生产环境,那没有这么做的意思应该是「使用开发环境」,可以确认一下(看看那个插件的介绍),然后把这个地方的翻译调整一下。

补充一下,这个地方直接翻译为在开发环境下好像并不准确,因为没有指定 mode 时默认值为 none 好像是独立的模式……所以此处的「没有这么做」应该指的是 mode = 'development' | 'none'

zhper
zhper previously approved these changes Dec 15, 2023
@Yucohny
Copy link
Member Author

Yucohny commented Dec 15, 2023

T> 在使用 tree shaking 时必须有 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin) 的支持,可以通过设置配置项 `mode: "production"` 启用它。如果没有这么做,那么需要手动引入 [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin)

「如果没有这么做」,这个地方前文指的是开启生产环境,那没有这么做的意思应该是「使用开发环境」,可以确认一下(看看那个插件的介绍),然后把这个地方的翻译调整一下。

补充一下,这个地方直接翻译为在开发环境下好像并不准确,因为没有指定 mode 时默认值为 none 好像是独立的模式……所以此处的「没有这么做」应该指的是 mode = 'development' | 'none'

仔细想了一下,这个地方确实是我理解不太对……就保留原本的意思更准确。

@zhper zhper requested review from zhper and removed request for zhper December 19, 2023 11:45
@zhper zhper dismissed their stale review December 20, 2023 03:08

cancel approval

@Yucohny Yucohny merged commit b525c22 into docschina:cn Jan 16, 2024
6 checks passed
@Yucohny Yucohny deleted the tree-shaking branch January 16, 2024 07:24
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.

2 participants