@plaudit/webpack-extensions 2.96.0 → 2.96.2
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/CHANGELOG.md
CHANGED
|
@@ -60,6 +60,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
60
60
|
- Legacy PostCSS features that have been integrated into modern CSS
|
|
61
61
|
- `@extends` support
|
|
62
62
|
|
|
63
|
+
## [2.96.2] - 2026-08-11
|
|
64
|
+
### Removed
|
|
65
|
+
- `processTranslationConfigs` because it should not be used and didn't actually do anything
|
|
66
|
+
|
|
67
|
+
### Internals
|
|
68
|
+
- Added more integration tests
|
|
69
|
+
|
|
70
|
+
## [2.96.1] - 2026-08-10
|
|
71
|
+
### Fixed
|
|
72
|
+
- An error in how externalized dependencies were resolved that caused jquery to never be emitted as a dependency
|
|
73
|
+
|
|
63
74
|
## [2.96.0] - 2026-08-07
|
|
64
75
|
### Added
|
|
65
76
|
- A port of WordPress's Dependency Extraction Webpack Plugin because they keep breaking it
|
package/dist/shared.d.ts
CHANGED
|
@@ -145,7 +145,6 @@ export type PlauditWordpressWebpackConfig = {
|
|
|
145
145
|
};
|
|
146
146
|
externals?: Externals;
|
|
147
147
|
assumeGlobalizedPlauditLibraries?: boolean;
|
|
148
|
-
processTranslationConfigs?: boolean;
|
|
149
148
|
useWebpackResourceFiltering?: boolean;
|
|
150
149
|
outputDir?: string;
|
|
151
150
|
extensionsVersion?: 1 | 2 | 3;
|
|
@@ -171,7 +170,6 @@ export declare function applyStandards(config: PlauditWordpressWebpackConfig): {
|
|
|
171
170
|
};
|
|
172
171
|
readonly externals?: Externals;
|
|
173
172
|
readonly assumeGlobalizedPlauditLibraries?: boolean;
|
|
174
|
-
readonly processTranslationConfigs?: boolean;
|
|
175
173
|
useWebpackResourceFiltering?: boolean;
|
|
176
174
|
outputDir?: string;
|
|
177
175
|
extensionsVersion?: 1 | 2 | 3;
|
|
@@ -308,7 +308,10 @@ class EnhancedDependencyExtractionWebpackPlugin {
|
|
|
308
308
|
* @param {boolean} [fromAsyncChunk] Module was found in an async chunk of the entry.
|
|
309
309
|
*/
|
|
310
310
|
const processModule = (m, fromAsyncChunk) => {
|
|
311
|
-
|
|
311
|
+
let viableRequest = typeof m.request === 'string' && m.request !== '__REMOVE_ME__' ? m.request : m.userRequest;
|
|
312
|
+
if (viableRequest !== undefined && !this.externalizedDeps.has(viableRequest) && viableRequest !== m.userRequest) {
|
|
313
|
+
viableRequest = m.userRequest;
|
|
314
|
+
}
|
|
312
315
|
if (viableRequest !== undefined && this.externalizedDeps.has(viableRequest)) {
|
|
313
316
|
if (this.useModules) {
|
|
314
317
|
// A static occurrence (in the entry chunk) wins.
|
|
@@ -147,7 +147,7 @@ function injectSupportForInliningSVGsAsStrings(rules) {
|
|
|
147
147
|
}
|
|
148
148
|
function buildVerifiedConfig(config) {
|
|
149
149
|
config = (0, shared_1.applyStandards)(config);
|
|
150
|
-
const { standaloneBlocks = false, stats = 'errors-warnings', variables: rawVariables, verbose = process.argv.includes('--verbose') || process.env['VERBOSE'] === 'true', postcss = {}, externals, assumeGlobalizedPlauditLibraries = true,
|
|
150
|
+
const { standaloneBlocks = false, stats = 'errors-warnings', variables: rawVariables, verbose = process.argv.includes('--verbose') || process.env['VERBOSE'] === 'true', postcss = {}, externals, assumeGlobalizedPlauditLibraries = true, useWebpackResourceFiltering = true, plainEntrypointsVersion = 1, srcDir = "", useUnifiedLoader = false, includePostInitFallback = false, omitDistDev = false, onlyRunPostCSSOnPCSS = false, useBlockSupportsAsThemeJsonDefaults = true, } = config;
|
|
151
151
|
let outputDir = config.outputDir ?? "";
|
|
152
152
|
if (outputDir && useUnifiedLoader && !omitDistDev && (process.env['SERVER_MODE'] ?? 'development') === 'development') {
|
|
153
153
|
outputDir += "-dev";
|
|
@@ -184,9 +184,9 @@ function buildVerifiedConfig(config) {
|
|
|
184
184
|
extensionsVersion = 3; // Version 3 is a backwards-compatible upgrade of version 2, so we can automatically upgrade everything
|
|
185
185
|
}
|
|
186
186
|
const cfg = {
|
|
187
|
-
currentVariables, postcss, standaloneBlocks, stats, variablesFilePath, verbose, externals, assumeGlobalizedPlauditLibraries,
|
|
188
|
-
useWebpackResourceFiltering, outputDir, extensionsVersion, plainEntrypointsVersion, srcDir, srcPrefixes, targetHandlePrefix,
|
|
189
|
-
onlyRunPostCSSOnPCSS, useBlockSupportsAsThemeJsonDefaults
|
|
187
|
+
currentVariables, postcss, standaloneBlocks, stats, variablesFilePath, verbose, externals, assumeGlobalizedPlauditLibraries,
|
|
188
|
+
useWebpackResourceFiltering, outputDir, extensionsVersion, plainEntrypointsVersion, srcDir, srcPrefixes, targetHandlePrefix,
|
|
189
|
+
useUnifiedLoader, includePostInitFallback, omitDistDev, onlyRunPostCSSOnPCSS, useBlockSupportsAsThemeJsonDefaults
|
|
190
190
|
};
|
|
191
191
|
// Destination -> source map
|
|
192
192
|
const allocatedDestinations = {};
|
|
@@ -433,16 +433,14 @@ function commonConfigProcessingPrep(config, webpackConfig) {
|
|
|
433
433
|
},
|
|
434
434
|
injectSupportForInliningSVGsAsStrings
|
|
435
435
|
].reduce((r, a) => a(r), webpackConfig.module?.rules ?? []);
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
});
|
|
445
|
-
}
|
|
436
|
+
fixedRules.push({
|
|
437
|
+
test: /wpml-config\.xml$/i,
|
|
438
|
+
type: 'asset/resource',
|
|
439
|
+
generator: {
|
|
440
|
+
filename: '[name][ext]',
|
|
441
|
+
emit: false
|
|
442
|
+
}
|
|
443
|
+
});
|
|
446
444
|
return {
|
|
447
445
|
entrypointFields, fixedRules, processingModules, scriptExtension,
|
|
448
446
|
updateCurrentVariables: (value) => currentVariables = value
|
|
@@ -502,7 +500,7 @@ function processIndividualWebpackConfig(config, webpackConfig, sources, canClean
|
|
|
502
500
|
}
|
|
503
501
|
plugin = new EnhancedBlockJSONPlugin_1.EnhancedBlockJSONPlugin(config, dest, removeEmptyScriptsPlugin, contextPath, (0, common_config_helpers_1.resolveEntryFromDirectory)(commonConfig, srcRoot, dest));
|
|
504
502
|
plugins.push(plugin);
|
|
505
|
-
if (
|
|
503
|
+
if (!processingModules) {
|
|
506
504
|
plugins.push(new WPMLConfigBuilder_1.WPMLConfigBuilderPlugin(dest.destination, plugin));
|
|
507
505
|
}
|
|
508
506
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "2.96.
|
|
3
|
+
"version": "2.96.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -96,7 +96,8 @@
|
|
|
96
96
|
"watch": "tsc -w",
|
|
97
97
|
"test": "pnpm run build && pnpm run test:no-build",
|
|
98
98
|
"test:no-build": "rm -rf tests/.tmp/coverage/jest && NODE_V8_COVERAGE=tests/.tmp/coverage/jest jest",
|
|
99
|
-
"test:
|
|
99
|
+
"test:update": "pnpm run build && rm -rf tests/.tmp/coverage/jest && NODE_V8_COVERAGE=tests/.tmp/coverage/jest jest -u",
|
|
100
|
+
"test:paths": "pnpm run build && jest \"tests/integration-[0-9]+x/paths\"",
|
|
100
101
|
"test:gaps": "node tests/tools/coverage-gaps.js",
|
|
101
102
|
"update": "pnpm add --config '@plaudit/pnpm-plugin-plaudit-config@*' && pnpm up"
|
|
102
103
|
}
|