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/plugins/aggressive-splitting-plugin.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
title: AggressiveSplittingPlugin
3
3
contributors:
4
4
- pierreneter
5
+
- byzyk
5
6
---
6
7
7
8
The `AggressiveSplittingPlugin` can split bundles into smaller chunks, splitting every chunk until it reaches the specified `maxSize` configured in `options`. It groups modules together by folder structure.
@@ -19,7 +20,7 @@ new webpack.optimize.AggressiveSplittingPlugin(options)
Copy file name to clipboardexpand all lines: src/content/plugins/commons-chunk-plugin.md
+21-17
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ contributors:
7
7
- kevinzwhuang
8
8
- jdbevan
9
9
- jeremenichelli
10
+
- byzyk
10
11
---
11
12
12
13
The `CommonsChunkPlugin` is an opt-in feature that creates a separate file (known as a chunk), consisting of common modules shared between multiple entry points.
@@ -22,7 +23,7 @@ new webpack.optimize.CommonsChunkPlugin(options)
22
23
23
24
## Options
24
25
25
-
```javascript
26
+
```ts
26
27
{
27
28
name: string, // or
28
29
names: string[],
@@ -38,7 +39,7 @@ new webpack.optimize.CommonsChunkPlugin(options)
38
39
// If omitted the original filename is not modified (usually `output.filename` or `output.chunkFilename`).
39
40
// This option is not permitted if you're using `options.async` as well, see below for more details.
Affected By `ProvidePlugin` Or Using `module` | Prevent
37
-
HMR Accepted | Root
38
+
HMR Accepted | Root
38
39
Using `eval()` | Prevent
39
40
In Multiple Chunks | Prevent
40
41
`export * from "cjs-module"` | Prevent
@@ -90,11 +91,13 @@ function tryToAdd(group, module) {
90
91
When using the webpack CLI, the `--display-optimization-bailout` flag will display bailout reasons. When using the webpack config, just add the following to the `stats` object:
This plugin enables more fine grained control of source map generation. It is an alternative to the [`devtool`](/configuration/devtool/) configuration option.
13
14
14
-
```js
15
+
```js
15
16
newwebpack.SourceMapDevToolPlugin(options)
16
17
```
17
18
@@ -50,7 +51,7 @@ The following examples demonstrate some common use cases for this plugin.
50
51
51
52
The following code would exclude source maps for any modules in the `vendor.js` bundle:
52
53
53
-
```js
54
+
```js
54
55
newwebpack.SourceMapDevToolPlugin({
55
56
filename:'[name].js.map',
56
57
exclude: ['vendor.js']
@@ -61,7 +62,7 @@ new webpack.SourceMapDevToolPlugin({
61
62
62
63
Set a URL for source maps. Useful for hosting them on a host that requires authorization.
0 commit comments