You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/configuration/entry-context.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Entry and Context
2
+
title: 入口和上下文(entry and context)
3
3
sort: 4
4
4
contributors:
5
5
- sokra
@@ -11,14 +11,14 @@ contributors:
11
11
- smelukov
12
12
---
13
13
14
-
The entry object is where webpack looks to start building the bundle. The context is an absolute string to the directory that contains the entry files.
By default the current directory is used, but it's recommended to pass a value in your configuration. This makes your configuration independent from CWD(current working directory).
32
+
默认使用当前目录,但是推荐在配置中传入一个值。这使得你的配置独立于 CWD(current working directory, 当前工作目录)。
33
33
34
34
---
35
35
@@ -38,11 +38,11 @@ By default the current directory is used, but it's recommended to pass a value i
The point or points where to start the application bundling process. If an array is passed then all items will be processed.
41
+
开始应用程序打包过程的一个或多个起点。如果传入数组,则会处理所有条目。
42
42
43
-
A dynamically loaded module is __not__ an entry point.
43
+
动态加载的模块 __不是__ 入口起点。
44
44
45
-
Simple rule: one entry point per HTML page. SPA: one entry point, MPA: multiple entry points.
45
+
简单规则:每个 HTML 页面都有一个入口起点。单页应用(SPA):一个入口起点,多页应用(MPA):多个入口起点。
46
46
47
47
```js
48
48
module.exports= {
@@ -58,11 +58,11 @@ module.exports = {
58
58
59
59
### Naming
60
60
61
-
If a string or array of strings is passed, the chunk is named `main`. If an object is passed, each key is the name of a chunk, and the value describes the entry point for the chunk.
Descriptor syntax might be used to pass additional options to an entry point.
87
+
描述符语法可以用来传入额外的选项给入口。
88
88
89
89
90
90
### Output filename
91
91
92
-
By default, the output filename for the entry chunk is extracted from [`output.filename`](/configuration/output/#outputfilename)but you can specify a custom output filename for a specific entry:
0 commit comments