@wordpress/dependency-extraction-webpack-plugin 6.13.0 → 6.13.1-next.cd6172eb0.0
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/lib/index.js +10 -0
- package/lib/util.js +1 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -387,6 +387,16 @@ class DependencyExtractionWebpackPlugin {
|
|
|
387
387
|
assetData.type = 'module';
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
if ( compilation.options?.optimization?.runtimeChunk !== false ) {
|
|
391
|
+
// Sets the script handle for the shared runtime file so WordPress registers it only once when using the asset file.
|
|
392
|
+
assetData.handle =
|
|
393
|
+
compilation.name +
|
|
394
|
+
'-' +
|
|
395
|
+
chunkJSFile
|
|
396
|
+
.replace( /\\/g, '/' )
|
|
397
|
+
.replace( jsExtensionRegExp, '' );
|
|
398
|
+
}
|
|
399
|
+
|
|
390
400
|
if ( combineAssets ) {
|
|
391
401
|
combinedAssetsData[ chunkJSFile ] = assetData;
|
|
392
402
|
continue;
|
package/lib/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/dependency-extraction-webpack-plugin",
|
|
3
|
-
"version": "6.13.0",
|
|
3
|
+
"version": "6.13.1-next.cd6172eb0.0",
|
|
4
4
|
"description": "Extract WordPress script dependencies from webpack bundles.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4cc93dc1781d8a7bc2bbde265913917920e2bd45"
|
|
42
42
|
}
|