@wordpress/dependency-extraction-webpack-plugin 3.5.0 → 3.6.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 +9 -13
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -126,9 +126,8 @@ class DependencyExtractionWebpackPlugin {
|
|
|
126
126
|
compilation.hooks.processAssets.tap(
|
|
127
127
|
{
|
|
128
128
|
name: this.constructor.name,
|
|
129
|
-
stage:
|
|
130
|
-
|
|
131
|
-
.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
129
|
+
stage: compiler.webpack.Compilation
|
|
130
|
+
.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
132
131
|
},
|
|
133
132
|
() => this.addAssets( compilation, compiler )
|
|
134
133
|
);
|
|
@@ -175,9 +174,8 @@ class DependencyExtractionWebpackPlugin {
|
|
|
175
174
|
|
|
176
175
|
const processModule = ( { userRequest } ) => {
|
|
177
176
|
if ( this.externalizedDeps.has( userRequest ) ) {
|
|
178
|
-
const scriptDependency =
|
|
179
|
-
userRequest
|
|
180
|
-
);
|
|
177
|
+
const scriptDependency =
|
|
178
|
+
this.mapRequestToDependency( userRequest );
|
|
181
179
|
entrypointExternalizedWpDeps.add( scriptDependency );
|
|
182
180
|
}
|
|
183
181
|
};
|
|
@@ -198,11 +196,8 @@ class DependencyExtractionWebpackPlugin {
|
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
|
|
201
|
-
const {
|
|
202
|
-
|
|
203
|
-
hashDigest,
|
|
204
|
-
hashDigestLength,
|
|
205
|
-
} = compilation.outputOptions;
|
|
199
|
+
const { hashFunction, hashDigest, hashDigestLength } =
|
|
200
|
+
compilation.outputOptions;
|
|
206
201
|
|
|
207
202
|
// Go through the assets and hash the sources. We can't just use
|
|
208
203
|
// `entrypointChunk.contentHash` because that's not updated when
|
|
@@ -282,8 +277,9 @@ class DependencyExtractionWebpackPlugin {
|
|
|
282
277
|
// The type indicates the option may be `undefined`.
|
|
283
278
|
// However, at this point in compilation, webpack has filled the options in if
|
|
284
279
|
// they were not provided.
|
|
285
|
-
const outputFolder = /** @type {{path:string}} */ (
|
|
286
|
-
.output
|
|
280
|
+
const outputFolder = /** @type {{path:string}} */ (
|
|
281
|
+
compiler.options.output
|
|
282
|
+
).path;
|
|
287
283
|
|
|
288
284
|
const assetsFilePath = path.resolve(
|
|
289
285
|
outputFolder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/dependency-extraction-webpack-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.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": "48d5f37dfb52d2e77c8eeb662f9874cf141b8c6b"
|
|
42
42
|
}
|