Skip to content

Commit f199d85

Browse files
docs(concepts) entry points concepts typing according to styleguide; … (#3301)
* dpcs(concepts) entry points concepts typing according to styleguide; rework single entry list into continuation of paragraph * Update src/content/concepts/entry-points.md * Update src/content/concepts/entry-points.md
1 parent 2b2cf3e commit f199d85

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/content/concepts/entry-points.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As mentioned in [Getting Started](/guides/getting-started/#using-a-configuration
1515

1616
## Single Entry (Shorthand) Syntax
1717

18-
Usage: `entry: string|Array<string>`
18+
Usage: `entry: string | [string]`
1919

2020
__webpack.config.js__
2121

@@ -44,7 +44,7 @@ This is a great choice when you are looking to quickly setup a webpack configura
4444

4545
## Object Syntax
4646

47-
Usage: `entry: {[entryChunkName: string]: string|Array<string>}`
47+
Usage: `entry: { [entryChunkName] string [string] }`
4848

4949
__webpack.config.js__
5050

@@ -68,7 +68,7 @@ Below is a list of entry configurations and their real-world use cases:
6868

6969
### Separate App and Vendor Entries
7070

71-
T> In webpack version < 4 it was common to add vendors as a separate entry point to compile it as a separate file (in combination with the `CommonsChunkPlugin`). <br><br> This is discouraged in webpack 4. Instead, the `optimization.splitChunks` option takes care of separating vendors and app modules and creating a separate file. __Do not__ create an entry for vendors or other stuff that is not the starting point of execution.
71+
T> In webpack version < 4 it was common to add vendors as a separate entry point to compile it as a separate file (in combination with the `CommonsChunkPlugin`). <br><br> This is discouraged in webpack 4. Instead, the [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) option takes care of separating vendors and app modules and creating a separate file. __Do not__ create an entry for vendors or other stuff that is not the starting point of execution.
7272

7373
### Multi Page Application
7474

@@ -86,8 +86,6 @@ module.exports = {
8686

8787
__What does this do?__ We are telling webpack that we would like 3 separate dependency graphs (like the above example).
8888

89-
__Why?__ In a multi-page application, the server is going to fetch a new HTML document for you. The page reloads this new document and assets are redownloaded. However, this gives us the unique opportunity to do multiple things:
90-
91-
- Use `optimization.splitChunks` to create bundles of shared application code between each page. Multi-page applications that reuse a lot of code/modules between entry points can greatly benefit from these techniques, as the number of entry points increases.
89+
__Why?__ In a multi-page application, the server is going to fetch a new HTML document for you. The page reloads this new document and assets are redownloaded. However, this gives us the unique opportunity to do things like using [`optimization.splitChunks`](/configuration/optimization/#optimizationsplitchunks) to create bundles of shared application code between each page. Multi-page applications that reuse a lot of code/modules between entry points can greatly benefit from these techniques, as the number of entry points increases.
9290

9391
T> As a rule of thumb: Use exactly one entry point for each HTML document.

0 commit comments

Comments
 (0)