@wordpress/dependency-extraction-webpack-plugin 4.15.0 → 4.17.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/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -27,6 +27,7 @@ class DependencyExtractionWebpackPlugin {
|
|
|
27
27
|
combinedOutputFile: null,
|
|
28
28
|
externalizedReport: false,
|
|
29
29
|
injectPolyfill: false,
|
|
30
|
+
__experimentalInjectInteractivityRuntime: false,
|
|
30
31
|
outputFormat: 'php',
|
|
31
32
|
outputFilename: null,
|
|
32
33
|
useDefaults: true,
|
|
@@ -142,6 +143,7 @@ class DependencyExtractionWebpackPlugin {
|
|
|
142
143
|
combinedOutputFile,
|
|
143
144
|
externalizedReport,
|
|
144
145
|
injectPolyfill,
|
|
146
|
+
__experimentalInjectInteractivityRuntime,
|
|
145
147
|
outputFormat,
|
|
146
148
|
outputFilename,
|
|
147
149
|
} = this.options;
|
|
@@ -184,6 +186,14 @@ class DependencyExtractionWebpackPlugin {
|
|
|
184
186
|
if ( injectPolyfill ) {
|
|
185
187
|
chunkDeps.add( 'wp-polyfill' );
|
|
186
188
|
}
|
|
189
|
+
// Temporary fix for Interactivity API until it gets moved to its package.
|
|
190
|
+
if ( __experimentalInjectInteractivityRuntime ) {
|
|
191
|
+
if ( ! chunkJSFile.startsWith( './interactivity/' ) ) {
|
|
192
|
+
chunkDeps.add( 'wp-interactivity-runtime' );
|
|
193
|
+
} else if ( './interactivity/runtime.min.js' === chunkJSFile ) {
|
|
194
|
+
chunkDeps.add( 'wp-interactivity-vendors' );
|
|
195
|
+
}
|
|
196
|
+
}
|
|
187
197
|
|
|
188
198
|
const processModule = ( { userRequest } ) => {
|
|
189
199
|
if ( this.externalizedDeps.has( userRequest ) ) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/dependency-extraction-webpack-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.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": "c7c79cb11b677adcbf06cf5f8cfb6c5ec1699f19"
|
|
42
42
|
}
|