Skip to content

Commit 429686d

Browse files
committed
Merge pull request #3 from lingochamp/improve-some-translation
improve some translation
2 parents 0df1bcd + e780f3e commit 429686d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

content/Optimizing-rebundling.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ You might notice after requiring React JS into your project that the time it tak
22

33
你可能注意到在引入 React JS 到你的项目之后,给你的应用重新合并会花费太多的时间。在开发环境中,最理想的是编译最多 200 到 800 毫秒的速度,取决于你在开发的应用。
44

5-
## 在开发环境中使用压缩文件
5+
## 在开发环境中使用压缩文件
66

77
Instead of making Webpack go through React JS and all its dependencies, you can override the behavior in development.
88

9-
为了不让 Webpack 去遍历 React JS 及其依赖,你可以在开发中重写它的行为。
9+
为了不让 Webpack 去遍历 React JS 及其所有依赖,你可以在开发中重写它的行为。
1010

1111
*webpack.config.js*
1212
```javascript
@@ -31,7 +31,7 @@ config = {
3131
loader: 'babel'
3232
}],
3333
noParse: [pathToReact]
34-
}
34+
}
3535
};
3636

3737
module.exports = config;
@@ -47,9 +47,9 @@ We do two things in this configuration:
4747

4848

4949

50-
1. 不管 “React” 是什么时候在代码中引入的,它会去匹配压缩后的 React JS 文件取代去 *node_modules* 中遍历
51-
2. 不管 Webpack 什么时候试图是解析压缩文件,我们阻止它,告诉它那不是必须的
50+
1. 每当 "react" 在代码中被引入,它会使用压缩后的 React JS 文件,而不是到 *node_modules* 中找
51+
2. 每当 Webpack 尝试去解析那个压缩后的文件,我们阻止它,因为这不必要
5252

5353
Take a look at [Optimizing development](Optimizing-development) for more information on this.
5454

55-
可以到 [优化开发](Optimizing-development) 看到更多这方面的信息。
55+
可以到 [优化开发](Optimizing-development) 看到更多这方面的信息。

content/Requiring-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Webpack allows you to use different module patterns, but "under the hood" they all work the same way. All of them also works straight out of the box.
44

5-
Webpack 允许你使用不同的模块类型,但是 “底层”必须使用同一种实现。所有的模块可以直接在盒外运行
5+
Webpack 允许你使用不同的模块类型,但是 “底层”必须使用同一种实现。所有的模块都能够开箱即用
66

77
#### ES6 模块
88

@@ -28,7 +28,7 @@ define(['./MyModule.js'], function (MyModule) {
2828

2929
A module is loaded by filepath. Imagine the following tree structure:
3030

31-
一个模块需要用它的文件路径来加载,看一下下面的这个结构:
31+
一个模块会按它的文件路径来加载,看一下下面的这个结构:
3232

3333
- /app
3434
- /modules

0 commit comments

Comments
 (0)