Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/content/concepts/entry-points.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ T> When running webpack without a configuration file, the entry defaults to `'./

Usage: `entry: string | [string]`

- `string`: a single entry file
- `[string]`: multiple entry files

**webpack.config.js**

```js
Expand Down Expand Up @@ -84,6 +87,11 @@ Single Entry Syntax is a great choice when you are looking to quickly set up a w

Usage: `entry: { <entryChunkName> string | [string] } | {}`

- `<entryChunkName>`: name of the entry chunk
- `string`: single entry file
- `[string]`: multiple entry files
- `{}`: empty object

**webpack.config.js**

```js
Expand Down Expand Up @@ -192,22 +200,26 @@ export default {
};
```

When building in `production` mode:

**webpack.prod.js**

```js
export default {
output: {
filename: "[name].[contenthash].bundle.js",
filename: "[name].[contenthash].bundle.js", // eg: main.abc123.bundle.js, vendor.abc123.bundle.js
},
};
```

When building in `development` mode:

**webpack.dev.js**

```js
export default {
output: {
filename: "[name].bundle.js",
filename: "[name].bundle.js", // eg: main.bundle.js, vendor.bundle.js
},
};
```
Expand Down
Loading