File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -569,10 +569,11 @@ Example values: `'web'`, `'node'`
569
569
570
570
<Badge text = " 5.27.0+" />
571
571
572
- Access to `contextify` and `absolutify` utilities.
572
+ Access to the following utilities.
573
573
574
- - `contextify`: Return a new request string avoiding absolute paths when possible.
575
574
- `absolutify`: Return a new request string using absolute paths when possible.
575
+ - `contextify`: Return a new request string avoiding absolute paths when possible.
576
+ - `createHash`: Return a new Hash object from provided hash function.
576
577
577
578
** my-sync-loader.js**
578
579
@@ -583,6 +584,11 @@ module.exports = function (content) {
583
584
this .utils .absolutify (this .context , ' ./index.js' )
584
585
);
585
586
this .utils .absolutify (this .context , this .resourcePath );
587
+ const mainHash = this .utils .createHash (
588
+ this ._compilation .outputOptions .hashFunction
589
+ );
590
+ mainHash .update (content );
591
+ mainHash .digest (' hex' );
586
592
// …
587
593
return content ;
588
594
};
You can’t perform that action at this time.
0 commit comments