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/output.md
-2
Original file line number
Diff line number
Diff line change
@@ -366,8 +366,6 @@ Example: `[\id\]` generates `[id]` instead of getting replaced with the `id`.
366
366
367
367
If using a function for this option, the function will be passed an object containing the substitutions in the table above.
368
368
369
-
T> When using the [`ExtractTextWebpackPlugin`](/plugins/extract-text-webpack-plugin), use `[contenthash]` to obtain a hash of the extracted file (neither `[hash]` nor `[chunkhash]` work).
Copy file name to clipboardExpand all lines: src/content/configuration/plugins.md
+1-5
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ contributors:
7
7
- yatharthk
8
8
- byzyk
9
9
- EugeneHlushko
10
+
- snitin315
10
11
---
11
12
12
13
The `plugins` option is used to customize the webpack build process in a variety of ways. webpack comes with a variety built-in plugins available under `webpack.[plugin-name]`. See [Plugins page](/plugins) for a list of plugins and documentation but note that there are a lot more out in the community.
@@ -40,17 +41,12 @@ __webpack.config.js__
40
41
```js
41
42
var webpack =require('webpack');
42
43
// importing plugins that do not come by default in webpack
43
-
var ExtractTextPlugin =require('extract-text-webpack-plugin');
44
44
var DashboardPlugin =require('webpack-dashboard/plugin');
Copy file name to clipboardExpand all lines: src/content/guides/production.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ contributors:
22
22
- wizardofhogwarts
23
23
- aholzner
24
24
- EugeneHlushko
25
+
- snitin315
25
26
---
26
27
27
28
In this guide, we'll dive into some of the best practices and utilities for building a production site or application.
@@ -199,7 +200,6 @@ webpack v4+ will minify your code by default in [`production mode`](/configurati
199
200
200
201
Note that while the [`TerserPlugin`](/plugins/terser-webpack-plugin/) is a great place to start for minification and being used by default, there are other options out there:
If you decide to try another minification plugin, just make sure your new choice also drops dead code as described in the [tree shaking](/guides/tree-shaking) guide and provide it as the [`optimization.minimizer`](/configuration/optimization/#optimizationminimizer).
Copy file name to clipboardExpand all lines: src/content/plugins/commons-chunk-plugin.md
+1-16
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ contributors:
9
9
- jeremenichelli
10
10
- byzyk
11
11
- madhavarshney
12
+
- snitin315
12
13
---
13
14
14
15
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.
@@ -216,22 +217,6 @@ new webpack.optimize.CommonsChunkPlugin({
216
217
});
217
218
```
218
219
219
-
In order to obtain a single CSS file containing your application and vendor CSS, use the following `minChunks` function together with [`ExtractTextPlugin`](/plugins/extract-text-webpack-plugin/):
220
-
221
-
```javascript
222
-
newwebpack.optimize.CommonsChunkPlugin({
223
-
name:'vendor',
224
-
minChunks:function (module) {
225
-
// This prevents stylesheet resources with the .css or .scss extension
226
-
// from being moved from their original chunk to the vendor chunk
To extract the webpack bootstrap logic into a separate file, use the `CommonsChunkPlugin` on a `name` which is not defined as `entry`. Commonly the name `manifest` is used. See the [caching guide](/guides/caching) for details.
0 commit comments