Skip to content

docs(cn): translate src/content/configuration/output.md #776

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

Merged
merged 10 commits into from
Jun 30, 2020

Conversation

yolilufei
Copy link

No description provided.

@netlify
Copy link

netlify bot commented Jun 21, 2020

Deploy preview for cn-webpack ready!

Built with commit 15fde56

https://deploy-preview-776--cn-webpack.netlify.app

@QC-L
Copy link
Member

QC-L commented Jun 22, 2020

你这标题是不是错了...

@QC-L QC-L changed the title docs(cn): translate src/content/configuration/mode.md docs(cn): translate src/content/configuration/output.md Jun 22, 2020
amd: 'AMD Comment'
}
}
root: "Root Comment",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要修改原文的符号...你本地有 Lint 嘛?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本地有lint,不过我的格式化插件在保存时生效了,导致加了不必要的符号,我调整下


__webpack.config.js__
**webpack.config.js**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也是,不要改变原文的符号


__webpack.config.js__
**webpack.config.js**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里v4的翻译加粗是 **, 我保持一致就改了符号了,不好意思,我调整一下

| [resource-path] | The path used to resolve the file without any query params |
| [namespace] | The modules namespace. This is usually the library name when building as a library, empty otherwise |
| 模板 | 描述 |
| ------------------------ | -------------------------------------------------------------------------- |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也是,不要自己添油加醋

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是v4 copy过来的,存在什么问题么?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy 讲究的是,保证原文不变,然后基础上翻译。现在这里修改了原文,以及空格

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

说白了,还是格式化了。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,我调整下

| [resource] | The path used to resolve the file and any query params used on the first loader |
| [resource-path] | The path used to resolve the file without any query params |
| [namespace] | The modules namespace. This is usually the library name when building as a library, empty otherwise |
| 模板 | 描述 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```javascript
module.exports = {
//...
output: {
devtoolModuleFilenameTemplate: info => {
devtoolModuleFilenameTemplate: (info) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我严重怀疑你格式化了....

@yolilufei
Copy link
Author

您好,我修复了相关问题,已经提交,是否需要重新提交PR,添麻烦了。



## `output.libraryExport`

`string` `[string]`

Configure which module or modules will be exposed via the `libraryTarget`. It is `undefined` by default, same behaviour will be applied if you set `libraryTarget` to an empty string e.g. `''` it will export the whole (namespace) object. The examples below demonstrate the effect of this configuration when using `libraryTarget: 'var'`.
Configure which module or modules will be exposed via the `libraryTarget`. It is `undefined` by default, same behaviour will be applied if you set `libraryTarget` to an empty string e.g. `''` it will export the whole (namespace) object. The examples below demonstrate the effect of this config when using `libraryTarget: 'var'`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是什么情况?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也是v4 copy过来的,我没有仔细检查其中差异,我再调整一下

@yolilufei
Copy link
Author

您好,相关问题已经修复,包括英文单词不一致、表格格式化、末尾逗号问题。

@@ -398,13 +398,13 @@ module.exports = {

`string`

A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals. It defaults to [`output.library`](/configuration/output/#outputlibrary) name or the package name from `package.json` in the context, if both aren't found, it is set to an `''`.

在全局环境下为防止多个 webpack 运行时 冲突所使用的唯一名称。默认使用 [`output.library`](/configuration/output/#outputlibrary) 名称或者上下文中的 `package.json` 的 包名称(package name), 如果两者都不存在,值为 `''`。
`output.uniqueName` will be used to generate unique globals for:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行没翻译,然后多删了一个空行

`output.uniqueName` will be used to generate unique globals for:

- [`output.jsonpFunction`](/configuration/output/#outputjsonpfunction)
- [`output.chunkCallbackName`](/configuration/output/#outputchunkcallbackname)


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里多了空行



## `output.hotUpdateMainFilename`

`string = '[hash].hot-update.json'` `function`
`string: '[hash].hot-update.json'` `function`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`string: '[hash].hot-update.json'` `function`
`string = '[hash].hot-update.json'` `function`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里怎么改了?


```javascript
var MyLibrary = _entry_return_;

// In a separate script...
// 在一个单独的 script……
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 在一个单独的 script……
// 在一个单独的 script...


```javascript
this['MyLibrary'] = _entry_return_;

// In a separate script...
// 在一个单独的 script……
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 在一个单独的 script……
// 在一个单独的 script...

@QC-L QC-L mentioned this pull request Jun 26, 2020
49 tasks
yolilufei and others added 5 commits June 29, 2020 23:26
Co-authored-by: QiChang Li <github@liqichang.com>
[`templatedpathplugin`]重复了,已修复

Co-authored-by: QiChang Li <github@liqichang.com>
@QC-L QC-L merged commit 8eedfca into docschina:cn Jun 30, 2020
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