Skip to content

Commit 2e88e4c

Browse files
authored
docs(plugins): remove all depreciated plugins (#3776)
1 parent 82b9e92 commit 2e88e4c

File tree

8 files changed

+5
-46
lines changed

8 files changed

+5
-46
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"lint:markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
4747
"lint:social": "alex . -q",
4848
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
49-
"lint:links": "hyperlink -c 8 -r dist/index.html --canonicalroot https://webpack.js.org/ -i --skip https://img.shields.io --skip **/printable** --skip https://david-dm.org --skip https://codecov.io/gh --skip 'content-type-mismatch https://travis-ci.org' > internal-links.tap; cat internal-links.tap | tap-spot",
49+
"lint:links": "hyperlink -c 8 -r dist/index.html --canonicalroot https://webpack.js.org/ -i --skip https://img.shields.io --skip /plugins/extract-text-webpack-plugin/ --skip **/printable** --skip https://david-dm.org --skip https://codecov.io/gh --skip 'content-type-mismatch https://travis-ci.org' > internal-links.tap; cat internal-links.tap | tap-spot",
5050
"sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml",
5151
"serve": "npm run build && sirv start ./dist --port 4000",
5252
"deploy": "gh-pages -d dist",

repositories/plugins.json

-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
[
2-
"webpack-contrib/i18n-webpack-plugin",
32
"webpack-contrib/compression-webpack-plugin",
4-
"webpack-contrib/extract-text-webpack-plugin",
53
"webpack-contrib/copy-webpack-plugin",
64
"webpack-contrib/npm-install-webpack-plugin",
75
"webpack-contrib/stylelint-webpack-plugin",
8-
"webpack-contrib/babel-minify-webpack-plugin",
9-
"webpack-contrib/uglifyjs-webpack-plugin",
10-
"webpack-contrib/zopfli-webpack-plugin",
116
"webpack-contrib/closure-webpack-plugin",
127
"webpack-contrib/mini-css-extract-plugin",
138
"webpack-contrib/terser-webpack-plugin",

src/components/Organization/projects.json

-12
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@
101101
"description": "Source code handling classes for webpack.",
102102
"maintainer": ""
103103
},
104-
{
105-
"repo": "webpack-contrib/extract-text-webpack-plugin",
106-
"npm": "extract-text-webpack-plugin",
107-
"description": "Extract text from a bundle into a file.",
108-
"maintainer": ""
109-
},
110104
{
111105
"repo": "webpack-contrib/sass-loader",
112106
"npm": "sass-loader",
@@ -221,12 +215,6 @@
221215
"description": "Load and execute a module while compiling, returning the result.",
222216
"maintainer": ""
223217
},
224-
{
225-
"repo": "webpack-contrib/i18n-webpack-plugin",
226-
"npm": "i18n-webpack-plugin",
227-
"description": "Embed localization into your bundle.",
228-
"maintainer": ""
229-
},
230218
{
231219
"repo": "webpack-contrib/json5-loader",
232220
"npm": "json5-loader",

src/content/configuration/output.md

-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ Example: `[\id\]` generates `[id]` instead of getting replaced with the `id`.
366366

367367
If using a function for this option, the function will be passed an object containing the substitutions in the table above.
368368

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).
370-
371369
## `output.assetModuleFilename`
372370

373371
`string = '[hash][ext][query]'`

src/content/configuration/plugins.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ contributors:
77
- yatharthk
88
- byzyk
99
- EugeneHlushko
10+
- snitin315
1011
---
1112

1213
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__
4041
```js
4142
var webpack = require('webpack');
4243
// importing plugins that do not come by default in webpack
43-
var ExtractTextPlugin = require('extract-text-webpack-plugin');
4444
var DashboardPlugin = require('webpack-dashboard/plugin');
4545

4646
// adding plugins to your configuration
4747
module.exports = {
4848
//...
4949
plugins: [
50-
new ExtractTextPlugin({
51-
filename: 'build.min.css',
52-
allChunks: true,
53-
}),
5450
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
5551
// compile time plugins
5652
new webpack.DefinePlugin({

src/content/guides/production.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ contributors:
2222
- wizardofhogwarts
2323
- aholzner
2424
- EugeneHlushko
25+
- snitin315
2526
---
2627

2728
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
199200

200201
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:
201202

202-
- [`BabelMinifyWebpackPlugin`](https://github.com/webpack-contrib/babel-minify-webpack-plugin)
203203
- [`ClosureWebpackPlugin`](https://github.com/webpack-contrib/closure-webpack-plugin)
204204

205205
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).

src/content/plugins/commons-chunk-plugin.md

+1-16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ contributors:
99
- jeremenichelli
1010
- byzyk
1111
- madhavarshney
12+
- snitin315
1213
---
1314

1415
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({
216217
});
217218
```
218219
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-
new webpack.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
227-
if(module.resource && (/^.*\.(css|scss)$/).test(module.resource)) {
228-
return false;
229-
}
230-
return module.context && module.context.includes('node_modules');
231-
}
232-
});
233-
```
234-
235220
## Manifest file
236221
237222
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.

src/content/plugins/index.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ contributors:
1010
- refactorized
1111
- byzyk
1212
- EugeneHlushko
13+
- snitin315
1314
---
1415

1516
webpack has a rich plugin interface. Most of the features within webpack itself use this plugin interface. This makes webpack __flexible__.
1617

1718
Name | Description
1819
-------------------------------------------------------- | -----------
19-
[`BabelMinifyWebpackPlugin`](/plugins/babel-minify-webpack-plugin) | Minification with [babel-minify](https://github.com/babel/minify)
2020
[`BannerPlugin`](/plugins/banner-plugin) | Add a banner to the top of each generated chunk
2121
[`CommonsChunkPlugin`](/plugins/commons-chunk-plugin) | Extract common modules shared between chunks
2222
[`CompressionWebpackPlugin`](/plugins/compression-webpack-plugin) | Prepare compressed versions of assets to serve them with Content-Encoding
@@ -25,10 +25,8 @@ Name | Description
2525
[`DefinePlugin`](/plugins/define-plugin) | Allow global constants configured at compile time
2626
[`DllPlugin`](/plugins/dll-plugin) | Split bundles in order to drastically improve build time
2727
[`EnvironmentPlugin`](/plugins/environment-plugin) | Shorthand for using the [`DefinePlugin`](/plugins/define-plugin) on `process.env` keys
28-
[`ExtractTextWebpackPlugin`](/plugins/extract-text-webpack-plugin) | Extract text (CSS) from your bundles into a separate file
2928
[`HotModuleReplacementPlugin`](/plugins/hot-module-replacement-plugin) | Enable Hot Module Replacement (HMR)
3029
[`HtmlWebpackPlugin`](/plugins/html-webpack-plugin) | Easily create HTML files to serve your bundles
31-
[`I18nWebpackPlugin`](/plugins/i18n-webpack-plugin) | Add i18n support to your bundles
3230
[`IgnorePlugin`](/plugins/ignore-plugin) | Exclude certain modules from bundles
3331
[`LimitChunkCountPlugin`](/plugins/limit-chunk-count-plugin) | Set min/max limits for chunking to better control chunking
3432
[`MinChunkSizePlugin`](/plugins/min-chunk-size-plugin) | Keep chunk size above the specified limit
@@ -41,6 +39,5 @@ Name | Description
4139
[`SourceMapDevToolPlugin`](/plugins/source-map-dev-tool-plugin) | Enables a more fine grained control of source maps
4240
[`EvalSourceMapDevToolPlugin`](/plugins/eval-source-map-dev-tool-plugin) | Enables a more fine grained control of eval source maps
4341
[`TerserPlugin`](/plugins/terser-webpack-plugin/) | Uses Terser to minify the JS in your project
44-
[`ZopfliWebpackPlugin`](/plugins/zopfli-webpack-plugin) | Prepare compressed versions of assets with node-zopfli
4542

4643
For more third-party plugins, see the list from [awesome-webpack](https://github.com/webpack-contrib/awesome-webpack#webpack-plugins).

0 commit comments

Comments
 (0)