-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(cn): translate src/content/migrate/4.md #772
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
Conversation
src/content/migrate/4.md
Outdated
url: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693 | ||
- title: 'webpack 4: migration guide for plugins/loaders' | ||
url: https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202 | ||
相关信息: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不需要翻译
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请参考其他 pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改,请审阅
src/content/migrate/4.md
Outdated
title: To v4 from v3 | ||
sort: 2 | ||
contributors: | ||
标题: 从V3到V4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你改动了文档格式...
Deploy preview for cn-webpack ready! Built with commit 1b1891c |
src/content/migrate/4.md
Outdated
@@ -14,30 +14,30 @@ related: | |||
url: https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202 | |||
--- | |||
|
|||
This guide only shows major changes that affect end users. For more details please see [the changelog](https://github.com/webpack/webpack/releases). | |||
这篇指南仅仅展示了影响用户使用的主要改变。更多细节查看 [更新日志(the changelog)](ttps://github.com/webpack/webpack/releases)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这篇指南仅仅展示了影响用户使用的主要改变。更多细节查看 [更新日志(the changelog)](ttps://github.com/webpack/webpack/releases)。 | |
这篇指南仅仅展示了影响用户使用的主要改变。更多细节查看 [更新日志(the changelog)](https://github.com/webpack/webpack/releases)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改
src/content/migrate/4.md
Outdated
|
||
The CLI has moved to a separate package: webpack-cli. You need to install it before using webpack, see [basic setup](/guides/getting-started/#basic-setup). | ||
脚手架 (CLI) 已经放至一个单独的 webpack-cli 中。在你使用 webpack之前需要安装它,参见 [基础步骤](/guides/getting-started/#basic-setup). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
脚手架 (CLI) 已经放至一个单独的 webpack-cli 中。在你使用 webpack之前需要安装它,参见 [基础步骤](/guides/getting-started/#basic-setup). | |
脚手架 (CLI) 已经放至一个单独的 webpack-cli 中。在你使用 webpack 之前需要安装它,参见[基础步骤](/guides/getting-started/#basic-setup). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改
src/content/migrate/4.md
Outdated
|
||
The installation guide can be found [here](/guides/installation). | ||
安装指南见 [这里](/guides/installation)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
安装指南见 [这里](/guides/installation)。 | |
安装指南见[这里](/guides/installation)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改
src/content/migrate/4.md
Outdated
|
||
|
||
## mode | ||
## 模式 (mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 模式 (mode) | |
## 模式(mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改
src/content/migrate/4.md
Outdated
|
||
Add the new [`mode`](/configuration/mode/) option to your configuration. Set it to `'production'`, `'development'` or `'none'` depending on your configuration type. | ||
在你的配置中添加新的 [`模式 (mode)`](/configuration/mode/) 选项。设置它为 `'生产 (production)'`, `'开发 (development)'` or `'无 (none)'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在你的配置中添加新的 [`模式 (mode)`](/configuration/mode/) 选项。设置它为 `'生产 (production)'`, `'开发 (development)'` or `'无 (none)'` | |
在你的配置中添加新的 [`模式(mode)`](/configuration/mode/) 选项。设置它为 `'production'`,`'development'` 或者 `'none'`。 |
src/content/migrate/4.md
Outdated
@@ -49,11 +49,11 @@ module.exports = { | |||
} | |||
``` | |||
|
|||
T> The purpose of `'development'` mode and `'production'` mode is different. You can use `webpack-merge` as shown in [production guide](/guides/production/#setup) to optimize configurations. | |||
注:`'开发 (development)'` 模式和 `'生产 (production)'` 模式的用途是不同的。你可以使用 [操作指南](/guides/production/#setup) 中的 `webpack-merge` 来优化配置。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注:`'开发 (development)'` 模式和 `'生产 (production)'` 模式的用途是不同的。你可以使用 [操作指南](/guides/production/#setup) 中的 `webpack-merge` 来优化配置。 | |
注:`'development'` 模式和 `'production'` 模式的用途不同。你可以使用 [操作指南](/guides/production/#setup) 中的 `webpack-merge` 来优化配置。 |
src/content/migrate/4.md
Outdated
|
||
These plugins can be removed from configuration as they are default in production mode: | ||
生产模式中已经默认了一些插件,这些默认插件可以在配置中被移除: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
生产模式中已经默认了一些插件,这些默认插件可以在配置中被移除: | |
生产模式中已经默认集成了部分插件,这部分默认插件可以在配置中被移除: |
src/content/migrate/4.md
Outdated
@@ -97,17 +97,17 @@ module.exports = { | |||
``` | |||
|
|||
|
|||
## CommonsChunkPlugin | |||
## 公共块插件 (CommonsChunkPlugin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## 公共块插件 (CommonsChunkPlugin) | |
## CommonsChunkPlugin |
src/content/migrate/4.md
Outdated
|
||
The `CommonsChunkPlugin` was removed. Instead the [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) options can be used. | ||
` 公共块插件 (CommonsChunkPlugin)` 已经被移除了。可以使用 [`分割块 (optimization.splitChunks)`](/configuration/optimization/#optimizationsplitchunks) 进行代替。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
` 公共块插件 (CommonsChunkPlugin)` 已经被移除了。可以使用 [`分割块 (optimization.splitChunks)`](/configuration/optimization/#optimizationsplitchunks) 进行代替。 | |
`CommonsChunkPlugin` 已被移除。可以使用 [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) 来代替。 |
src/content/migrate/4.md
Outdated
|
||
See documentation of the [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) for more details. The default configuration may already suit your needs. | ||
查看 [`分割块 (optimization.splitChunks)`](/configuration/optimization/#optimizationsplitchunks) 文档可了解更多细节。其默认配置可能已经满足你的需求。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
查看 [`分割块 (optimization.splitChunks)`](/configuration/optimization/#optimizationsplitchunks) 文档可了解更多细节。其默认配置可能已经满足你的需求。 | |
查阅 [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) 文档了解更多相关细节。其默认配置可能已经满足你的需求。 |
src/content/migrate/4.md
Outdated
|
||
When using a custom loader to transform `.json` files you now need to change the module `type`: | ||
当使用自定义加载器 (loader) 去转化 `.json` 文件时,你需要更改模块中的 `type`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当使用自定义加载器 (loader) 去转化 `.json` 文件时,你需要更改模块中的 `type`: | |
当使用自定义 loader 去转化 `.json` 文件时,你需要更改模块中的 `type`: |
src/content/migrate/4.md
Outdated
@@ -149,7 +149,7 @@ module.exports = { | |||
}; | |||
``` | |||
|
|||
When still using the `json-loader`, it can be removed: | |||
同时使用的 `json-loader` 可以被移除。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同时使用的 `json-loader` 可以被移除。 | |
仍在使用的 `json-loader` 可从项目中移除。 |
赞👍 |
翻译完成src\content\migrate\4.md文件