@rushstack/webpack4-module-minifier-plugin 0.9.23 → 0.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +6 -7
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/webpack4-module-minifier-plugin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.26",
|
|
4
4
|
"description": "This plugin splits minification of webpack compilations into smaller units.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "dist/webpack4-module-minifier-plugin.d.ts",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@rushstack/module-minifier": "0.1.
|
|
32
|
-
"@rushstack/worker-pool": "0.1.
|
|
31
|
+
"@rushstack/module-minifier": "0.1.27",
|
|
32
|
+
"@rushstack/worker-pool": "0.1.27",
|
|
33
33
|
"@types/node": "12.20.24",
|
|
34
34
|
"@types/tapable": "1.0.6",
|
|
35
35
|
"tapable": "1.1.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@rushstack/eslint-config": "3.0.0",
|
|
39
|
-
"@rushstack/heft": "0.47.
|
|
40
|
-
"@rushstack/heft-node-rig": "1.10.
|
|
39
|
+
"@rushstack/heft": "0.47.6",
|
|
40
|
+
"@rushstack/heft-node-rig": "1.10.8",
|
|
41
41
|
"@types/heft-jest": "1.0.1",
|
|
42
42
|
"@types/webpack": "4.41.32",
|
|
43
43
|
"@types/webpack-sources": "1.4.2",
|
|
@@ -51,6 +51,5 @@
|
|
|
51
51
|
"build": "heft build --clean",
|
|
52
52
|
"_phase:build": "heft build --clean",
|
|
53
53
|
"_phase:test": "heft test --no-build"
|
|
54
|
-
}
|
|
55
|
-
"readme": "# @rushstack/webpack4-module-minifier-plugin\n\n## Installation\n\n`npm install @rushstack/webpack4-module-minifier-plugin --save-dev`\n\n## Overview\n\nThis Webpack plugin performs minification of production assets on a per-module basis, rather than minifying an entire chunk at a time.\nIt issues async calls to the minifier for each unique module and each unique set of chunk boilerplate (i.e. the webpack runtime and the structure of the module list).\nThis improves minification time by:\n- Avoiding duplicate work for each module that is included in multiple distinct assets/chunks (this is common with async chunks)\n- Handing smaller code chunks to the minifier at a time (AST analysis is superlinear in size of the AST)\n- Even single asset builds will likely still contain multiple modules in the final output, which can be split across available CPU cores\n\n## Use with `[hash]` and `[contenthash]` tokens\nThe plugin will do its best to update webpack hashes if changing the direct inputs (`useSourceMap`, `compressAsyncImports` or `usePortableModules`) to the plugin, but if altering the `minifier` property itself, you may need to use the `output.hashSalt` property to force a change to the hashes, especially if leverging the `MessagePortMinifier` or similar, since it has no direct access to the configuration of the minifier.\n\n## Parallel execution\nIf running on node 10, you will need to ensure that the `--experimental-workers` flag is enabled.\n\n```js\nconst { ModuleMinifierPlugin, WorkerPoolMinifier } = require('@rushstack/webpack4-module-minifier-plugin');\n\n// In your webpack options:\noptimization: {\n minimizer: [\n new ModuleMinifierPlugin({\n minifier: new WorkerPoolMinifier(),\n // If not provided, the plugin will attempt to guess from `mode` and `devtool`.\n // Providing it expressly gives better results\n useSourceMap: true\n })\n ]\n}\n```\n\n## Single-threaded execution\nYou can also run the ModuleMinifierPlugin in a single-threaded configuration.\n\n```js\n// webpack.config.js\nconst { ModuleMinifierPlugin, LocalMinifier } = require('@rushstack/webpack4-module-minifier-plugin');\n\n// In your webpack options:\noptimization: {\n minimizer: [\n new ModuleMinifierPlugin({\n minifier: new LocalMinifier()\n })\n ]\n}\n```\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/main/webpack/module-minifier-plugin/CHANGELOG.md) - Find\n out what's new in the latest version\n\n`@rushstack/webpack4-module-minifier-plugin` is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
|
|
54
|
+
}
|
|
56
55
|
}
|