Skip to content

Commit 84594e1

Browse files
Merge pull request webpack#36 from dear-lizhihua/cn
安装 webpack
2 parents 01a91bf + 1c4eeab commit 84594e1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

content/get-started/install-webpack.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,42 @@ sort: 1
99

1010
### 预备知识
1111

12-
Before getting started, make sure you have a fresh version of [Node.js](https://nodejs.org/en/) installed. The current LTS is an ideal starting point. You may run into a variety of issues with the older versions as they may be missing functionality webpack or related packages might need.
12+
在开始前,先要确认你已经安装 [Node.js](https://nodejs.org/en/) 的最新版本。使用最新的 LTS 是理想的版本。使用旧版本,你可能遇到各种问题,因为它们可能缺少 webpack 功能或缺少相关 package 包。
1313

14-
### Global Installation
14+
### 全局安装
1515

1616
``` bash
1717
npm install webpack -g
1818
```
1919

20-
The `webpack` command is now available globally.
20+
现在可以在全局使用 `webpack` 命令了。
2121

22-
However, this is not a recommended practice. This locks you down to a specific version of webpack and might fail in projects that use a different version. The next section tells you how to install webpack locally in a project.
22+
然而,这并不是推荐用法。这会将你的 webpack 锁定到特定版本,并且可能在使用 webpack 不同版本的项目中失败。接下来的章节向你介绍如何在项目中本地安装 webpack。
2323

24-
### Local Installation
24+
### 本地安装
2525

2626
``` bash
2727
npm install webpack --save-dev
2828

2929
npm install webpack@<version> --save-dev
3030
```
3131

32-
If you are using npm scripts in your project, npm will try to look for webpack installation in your local modules for which this installation technique is useful.
32+
如果你在项目中使用了 npm scriptsnpm 会尝试在本地模块中查找安装的 webpack,这种本地安装的方式有助于查找本地的 webpack。
3333

3434
```json
3535
"scripts": {
3636
"start": "webpack --config mywebpack.config.js"
3737
}
3838
```
3939

40-
This is standard and recommended practice.
40+
这是标准和推荐的用法。
4141

42-
T> To run the local installation of webpack you can access its bin version as `node_modules/.bin/webpack`
42+
T> 要运行本地安装的 webpack,你可以访问其 bin 版本为 `node_modules/.bin/webpack`
4343

4444

45-
### Bleeding Edge
45+
### 前沿领域
4646

47-
If you are enthusiastic about using the latest that webpack has to offer (beware - may be unstable), you can install directly from the webpack repository using
47+
如果你热衷于使用 webpack 提供的最新版本(当心 - 可能不稳定),你可以直接从 webpack 仓库中安装
4848

4949
``` bash
5050
npm install webpack/webpack#<tagname/branchname>

0 commit comments

Comments
 (0)