webpack-assets-manifest 5.2.0 → 5.2.1
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/package.json +3 -3
- package/src/WebpackAssetsManifest.js +7 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack-assets-manifest",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "This Webpack plugin will generate a JSON file that matches the original filename with the hashed version.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"src"
|
|
29
29
|
],
|
|
30
|
-
"packageManager": "pnpm@8.15.
|
|
30
|
+
"packageManager": "pnpm@8.15.3+sha256.fc4a49bd609550a41e14d20efbce802a4b892aa4cac877322de2f0924f122991",
|
|
31
31
|
"lint-staged": {
|
|
32
32
|
"*.{js,json,md}": "cspell lint --no-progress --no-summary --no-must-find-files",
|
|
33
33
|
"*.js": "eslint --fix"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"copy-webpack-plugin": "^8.1.1",
|
|
68
68
|
"cspell": "^8.4.1",
|
|
69
69
|
"css-loader": "^5.2.7",
|
|
70
|
-
"eslint": "^8.
|
|
70
|
+
"eslint": "^8.57.0",
|
|
71
71
|
"eslint-config-prettier": "^9.1.0",
|
|
72
72
|
"file-loader": "^6.2.0",
|
|
73
73
|
"fs-extra": "^11.2.0",
|
|
@@ -14,11 +14,6 @@ const get = require('lodash.get');
|
|
|
14
14
|
const has = require('lodash.has');
|
|
15
15
|
const { validate } = require('schema-utils');
|
|
16
16
|
const { AsyncSeriesHook, SyncHook, SyncWaterfallHook } = require('tapable');
|
|
17
|
-
const {
|
|
18
|
-
Compilation,
|
|
19
|
-
NormalModule,
|
|
20
|
-
sources: { RawSource },
|
|
21
|
-
} = require('webpack');
|
|
22
17
|
|
|
23
18
|
const {
|
|
24
19
|
maybeArrayWrap,
|
|
@@ -420,7 +415,7 @@ class WebpackAssetsManifest {
|
|
|
420
415
|
|
|
421
416
|
this.maybeMerge();
|
|
422
417
|
|
|
423
|
-
compilation.emitAsset(output, new RawSource(this.toString(), false), {
|
|
418
|
+
compilation.emitAsset(output, new compilation.compiler.webpack.sources.RawSource(this.toString(), false), {
|
|
424
419
|
assetsManifest: true,
|
|
425
420
|
generated: true,
|
|
426
421
|
generatedBy: [PLUGIN_NAME],
|
|
@@ -697,7 +692,7 @@ class WebpackAssetsManifest {
|
|
|
697
692
|
* @param {object} module
|
|
698
693
|
*/
|
|
699
694
|
handleNormalModuleLoader(compilation, loaderContext, module) {
|
|
700
|
-
const
|
|
695
|
+
const emitFile = loaderContext.emitFile.bind(module);
|
|
701
696
|
const { contextRelativeKeys } = this.options;
|
|
702
697
|
|
|
703
698
|
// assetInfo parameter was added in Webpack 4.40.0
|
|
@@ -715,7 +710,7 @@ class WebpackAssetsManifest {
|
|
|
715
710
|
name,
|
|
716
711
|
);
|
|
717
712
|
|
|
718
|
-
|
|
713
|
+
emitFile(name, content, sourceMap, info);
|
|
719
714
|
};
|
|
720
715
|
}
|
|
721
716
|
|
|
@@ -744,7 +739,7 @@ class WebpackAssetsManifest {
|
|
|
744
739
|
* @param {object} compilation - the Webpack compilation object
|
|
745
740
|
*/
|
|
746
741
|
handleCompilation(compilation) {
|
|
747
|
-
NormalModule.getCompilationHooks(compilation).loader.tap(
|
|
742
|
+
compilation.compiler.webpack.NormalModule.getCompilationHooks(compilation).loader.tap(
|
|
748
743
|
PLUGIN_NAME,
|
|
749
744
|
this.handleNormalModuleLoader.bind(this, compilation),
|
|
750
745
|
);
|
|
@@ -752,7 +747,7 @@ class WebpackAssetsManifest {
|
|
|
752
747
|
compilation.hooks.processAssets.tap(
|
|
753
748
|
{
|
|
754
749
|
name: PLUGIN_NAME,
|
|
755
|
-
stage: Compilation.
|
|
750
|
+
stage: compilation.compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
756
751
|
},
|
|
757
752
|
this.handleProcessAssetsAnalyse.bind(this, compilation),
|
|
758
753
|
);
|
|
@@ -768,7 +763,7 @@ class WebpackAssetsManifest {
|
|
|
768
763
|
compilation.hooks.processAssets.tap(
|
|
769
764
|
{
|
|
770
765
|
name: PLUGIN_NAME,
|
|
771
|
-
stage: Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
766
|
+
stage: compilation.compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
772
767
|
},
|
|
773
768
|
this.recordSubresourceIntegrity.bind(this, compilation),
|
|
774
769
|
);
|
|
@@ -777,7 +772,7 @@ class WebpackAssetsManifest {
|
|
|
777
772
|
compilation.hooks.processAssets.tapPromise(
|
|
778
773
|
{
|
|
779
774
|
name: PLUGIN_NAME,
|
|
780
|
-
stage: Compilation.PROCESS_ASSETS_STAGE_REPORT,
|
|
775
|
+
stage: compilation.compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT,
|
|
781
776
|
},
|
|
782
777
|
this.handleProcessAssetsReport.bind(this, compilation),
|
|
783
778
|
);
|