@plaudit/webpack-extensions 2.54.0 → 2.55.1

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.
Files changed (42) hide show
  1. package/build/{wordpress-scripts-wrapper → plugins}/AdditionalDependencyInjectorPlugin.js +3 -3
  2. package/build/{wordpress-scripts-wrapper → plugins}/BlockJSONManagingPlugin.d.ts +4 -2
  3. package/build/{wordpress-scripts-wrapper → plugins}/BlockJSONManagingPlugin.js +14 -9
  4. package/build/{wordpress-scripts-wrapper → plugins}/ExtensionsConfigFileGeneratorPlugin.d.ts +6 -3
  5. package/build/plugins/ExtensionsConfigFileGeneratorPlugin.js +173 -0
  6. package/build/plugins/PlainEntrypointsConfigFileGeneratorPlugin.d.ts +24 -0
  7. package/build/plugins/PlainEntrypointsConfigFileGeneratorPlugin.js +244 -0
  8. package/build/plugins/SpecialAssetHandlingPlugin.d.ts +12 -0
  9. package/build/plugins/SpecialAssetHandlingPlugin.js +135 -0
  10. package/build/{wordpress-scripts-wrapper → plugins}/VariablesJSMonitorPlugin.js +1 -1
  11. package/build/{wordpress-scripts-wrapper → plugins}/WPMLConfigBuilder.d.ts +3 -2
  12. package/build/{wordpress-scripts-wrapper → plugins}/WPMLConfigBuilder.js +7 -3
  13. package/build/{wordpress-scripts-wrapper → plugins}/dependency-extraction-webpack-plugin-config-builder.d.ts +1 -7
  14. package/build/shared.d.ts +45 -18
  15. package/build/shared.js +18 -5
  16. package/build/utils/common-config-helpers.d.ts +26 -0
  17. package/build/utils/common-config-helpers.js +336 -0
  18. package/build/{wordpress-scripts-wrapper → utils}/php-serializer.d.ts +1 -1
  19. package/build/{wordpress-scripts-wrapper → utils}/php-serializer.js +1 -1
  20. package/build/utils/php-writer.d.ts +54 -0
  21. package/build/utils/php-writer.js +195 -0
  22. package/build/utils/pseduo-semaphore.d.ts +13 -0
  23. package/build/utils/pseduo-semaphore.js +63 -0
  24. package/build/wordpress-scripts-wrapper.d.ts +1 -20
  25. package/build/wordpress-scripts-wrapper.js +233 -443
  26. package/package.json +4 -4
  27. package/build/wordpress-scripts-wrapper/ExtensionsConfigFileGeneratorPlugin.js +0 -125
  28. package/build/wordpress-scripts-wrapper/SpecialAssetHandlingPlugin.d.ts +0 -7
  29. package/build/wordpress-scripts-wrapper/SpecialAssetHandlingPlugin.js +0 -107
  30. /package/build/{wordpress-scripts-wrapper → plugins}/AdditionalDependencyInjectorPlugin.d.ts +0 -0
  31. /package/build/{wordpress-scripts-wrapper → plugins}/BrowserSyncPlugin.d.ts +0 -0
  32. /package/build/{wordpress-scripts-wrapper → plugins}/BrowserSyncPlugin.js +0 -0
  33. /package/build/{wordpress-scripts-wrapper → plugins}/MiniCSSExtractPluginErrorCleaner.d.ts +0 -0
  34. /package/build/{wordpress-scripts-wrapper → plugins}/MiniCSSExtractPluginErrorCleaner.js +0 -0
  35. /package/build/{wordpress-scripts-wrapper → plugins}/PackageConfigSanityChecker.d.ts +0 -0
  36. /package/build/{wordpress-scripts-wrapper → plugins}/PackageConfigSanityChecker.js +0 -0
  37. /package/build/{wordpress-scripts-wrapper → plugins}/VariablesJSMonitorPlugin.d.ts +0 -0
  38. /package/build/{wordpress-scripts-wrapper → plugins}/dependency-extraction-webpack-plugin-config-builder.js +0 -0
  39. /package/build/{wordpress-scripts-wrapper → plugins}/static-configs.d.ts +0 -0
  40. /package/build/{wordpress-scripts-wrapper → plugins}/static-configs.js +0 -0
  41. /package/build/{wordpress-scripts-wrapper → utils}/json-to-php-but-with-__-injection.d.ts +0 -0
  42. /package/build/{wordpress-scripts-wrapper → utils}/json-to-php-but-with-__-injection.js +0 -0
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SpecialAssetHandlingPlugin = void 0;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const PlainEntrypointsConfigFileGeneratorPlugin_1 = require("./PlainEntrypointsConfigFileGeneratorPlugin");
9
+ const php_writer_1 = require("../utils/php-writer");
10
+ const pseduo_semaphore_1 = require("../utils/pseduo-semaphore");
11
+ class SpecialAssetHandlingPlugin {
12
+ outputDir;
13
+ static semaphore = new pseduo_semaphore_1.PseudoSemaphore({});
14
+ static previouslyIncludedFilenames = new Set(); // This allows us to ensure that assets that were previously being preloaded can be removed
15
+ static hasAttachedAssetCollatorForCurrentBatch = false;
16
+ static validPathname = undefined;
17
+ id;
18
+ constructor(outputDir) {
19
+ this.outputDir = outputDir;
20
+ this.id = Math.random().toString();
21
+ SpecialAssetHandlingPlugin.semaphore.register(this.id);
22
+ }
23
+ apply(compiler) {
24
+ compiler.hooks.compilation.tap(this.constructor.name, compilation => {
25
+ SpecialAssetHandlingPlugin.hasAttachedAssetCollatorForCurrentBatch = false;
26
+ SpecialAssetHandlingPlugin.semaphore.reset(this.id);
27
+ compilation.hooks.processAssets.tapPromise(this.constructor.name, async (assets) => {
28
+ try {
29
+ const specialAssetData = {};
30
+ for (const pathname of Object.keys(assets)) {
31
+ if (!SpecialAssetHandlingPlugin.validPathname) {
32
+ SpecialAssetHandlingPlugin.validPathname = pathname;
33
+ }
34
+ const assetInfo = compilation.assetsInfo.get(pathname);
35
+ if (!assetInfo?.sourceFilename) {
36
+ continue;
37
+ }
38
+ const filename = node_path_1.default.join(node_path_1.default.basename(node_path_1.default.dirname(pathname)), node_path_1.default.basename(pathname));
39
+ const queryStart = assetInfo.sourceFilename.indexOf('?');
40
+ if (queryStart < 0) {
41
+ if (SpecialAssetHandlingPlugin.previouslyIncludedFilenames.has(filename)) {
42
+ specialAssetData[filename] = {
43
+ preload: false,
44
+ fetchpriority: null,
45
+ crossorigin: null
46
+ };
47
+ }
48
+ continue;
49
+ }
50
+ const params = new URLSearchParams(assetInfo.sourceFilename.substring(queryStart + 1)
51
+ .replace(/(?:fetchPriority|crossOrigin)=/gi, str => str.toLowerCase()) //This ensures consistent capitalization of the fetchPriority parameter
52
+ );
53
+ if (params.has("preload")) {
54
+ SpecialAssetHandlingPlugin.validPathname = pathname;
55
+ specialAssetData[filename] = {
56
+ preload: true,
57
+ fetchpriority: params.get("fetchpriority"),
58
+ crossorigin: params.get("crossorigin")
59
+ };
60
+ }
61
+ }
62
+ SpecialAssetHandlingPlugin.semaphore.resolve(this.id, specialAssetData);
63
+ if (!SpecialAssetHandlingPlugin.hasAttachedAssetCollatorForCurrentBatch) {
64
+ SpecialAssetHandlingPlugin.hasAttachedAssetCollatorForCurrentBatch = true;
65
+ const collatedSpecialAssetData = (await SpecialAssetHandlingPlugin.semaphore.wait())
66
+ .reduce((collector, current) => ({ ...collector, ...current }), {});
67
+ this.collateAssets(compilation, collatedSpecialAssetData);
68
+ }
69
+ }
70
+ catch (e) {
71
+ SpecialAssetHandlingPlugin.semaphore.reject(this.id);
72
+ throw e;
73
+ }
74
+ });
75
+ });
76
+ }
77
+ collateAssets(compilation, collatedSpecialAssetData) {
78
+ const preloadedAssets = Object.entries(collatedSpecialAssetData)
79
+ .filter(([_, { preload }]) => preload)
80
+ .sort(([a], [b]) => a.localeCompare(b));
81
+ const outputFile = this.outputDir ? "special-assets.php" : node_path_1.default.join(node_path_1.default.dirname(node_path_1.default.dirname(SpecialAssetHandlingPlugin.validPathname)), "special-assets.php");
82
+ const writer = new php_writer_1.PHPWriter();
83
+ if (!preloadedAssets.length) {
84
+ writer.emitAsset(compilation, outputFile);
85
+ return;
86
+ }
87
+ PlainEntrypointsConfigFileGeneratorPlugin_1.PlainEntrypointsConfigFileGeneratorPlugin.emitResolveBaseUriFunction(writer);
88
+ writer.action("wp_head", writer => {
89
+ writer.call("plaudit_webpack_extensions__resolve_base_uri", [], { assignTo: "$base_uri" }).closePHP();
90
+ for (let [filename, { preload, fetchpriority, crossorigin }] of preloadedAssets) {
91
+ if (!preload) {
92
+ continue;
93
+ }
94
+ let fileExtension = node_path_1.default.extname(filename);
95
+ if (fileExtension.startsWith(".")) {
96
+ fileExtension = fileExtension.substring(1).toLowerCase();
97
+ }
98
+ else {
99
+ fileExtension = fileExtension.toLowerCase();
100
+ }
101
+ const attributes = [];
102
+ if (["woff", "woff2", "ttf", "otf", "eot"].includes(fileExtension)) {
103
+ if (!crossorigin) {
104
+ crossorigin = "anonymous";
105
+ }
106
+ attributes.push(["as", "font"], ["type", `font/${fileExtension}`]);
107
+ }
108
+ else if (fileExtension === "svg") {
109
+ attributes.push(["as", "image"], ["type", `image/svg+xml`]);
110
+ }
111
+ else if (fileExtension === "jpeg" || fileExtension === "jpg") {
112
+ attributes.push(["as", "image"], ["type", `image/jpeg`]);
113
+ }
114
+ else if (["png", "webp", "avif", "gif", "bmp"].includes(fileExtension)) {
115
+ attributes.push(["as", "image"], ["type", `image/${fileExtension}`]);
116
+ }
117
+ else {
118
+ compilation.errors.push(new Error(`Encountered preloading markup on an unsupported file extension (${fileExtension})`));
119
+ continue;
120
+ }
121
+ if (fetchpriority && fetchpriority !== 'auto') {
122
+ attributes.push(["fetchpriority", fetchpriority]);
123
+ }
124
+ if (crossorigin || crossorigin === "") {
125
+ attributes.push(["crossorigin", crossorigin]);
126
+ }
127
+ const dynamicAttrs = attributes.map(([k, v]) => v ? `${k}="${v}"` : k).join(" ");
128
+ writer.append(`<link rel="preload" href="<?= esc_url($base_uri.'${filename}') ?>" ${dynamicAttrs}>`);
129
+ }
130
+ writer.openPHP();
131
+ });
132
+ writer.emitAsset(compilation, outputFile);
133
+ }
134
+ }
135
+ exports.SpecialAssetHandlingPlugin = SpecialAssetHandlingPlugin;
@@ -7,7 +7,7 @@ class VariablesJSMonitorPlugin {
7
7
  this.variablesFilePath = variablesFilePath;
8
8
  }
9
9
  apply(compiler) {
10
- compiler.hooks.make.tap('VariablesJSMonitorPlugin', compilation => {
10
+ compiler.hooks.make.tap(this.constructor.name, compilation => {
11
11
  if (!compilation.fileDependencies.has(this.variablesFilePath)) {
12
12
  compilation.fileDependencies.add(this.variablesFilePath);
13
13
  }
@@ -1,12 +1,13 @@
1
- import { type Compiler, type WebpackPluginInstance } from "webpack";
2
1
  import { BlockJSONManagingPlugin } from "./BlockJSONManagingPlugin";
2
+ import { type Compiler, type WebpackPluginInstance } from "webpack";
3
3
  export declare class WPMLConfigBuilderPlugin implements WebpackPluginInstance {
4
4
  private readonly blockJSONManagingPlugin;
5
+ private readonly destDir;
5
6
  private static jsdomInstance?;
6
7
  private static domParser?;
7
8
  private static xmlSerializer?;
8
9
  private readonly parsedDocumentsCache;
9
- constructor(blockJSONManagingPlugin: BlockJSONManagingPlugin);
10
+ constructor(blockJSONManagingPlugin: BlockJSONManagingPlugin, destDir: string);
10
11
  apply(compiler: Compiler): void;
11
12
  private static getJSDOMInstance;
12
13
  private static getDOMParser;
@@ -5,17 +5,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.WPMLConfigBuilderPlugin = void 0;
7
7
  const promises_1 = __importDefault(require("node:fs/promises"));
8
+ const node_path_1 = __importDefault(require("node:path"));
8
9
  const jsdom_1 = require("jsdom");
9
10
  const webpack_1 = require("webpack");
10
11
  const xml_formatter_1 = __importDefault(require("xml-formatter"));
11
12
  class WPMLConfigBuilderPlugin {
12
13
  blockJSONManagingPlugin;
14
+ destDir;
13
15
  static jsdomInstance;
14
16
  static domParser;
15
17
  static xmlSerializer;
16
18
  parsedDocumentsCache = new Map();
17
- constructor(blockJSONManagingPlugin) {
19
+ constructor(blockJSONManagingPlugin, destDir) {
18
20
  this.blockJSONManagingPlugin = blockJSONManagingPlugin;
21
+ this.destDir = destDir;
19
22
  }
20
23
  apply(compiler) {
21
24
  compiler.hooks.compilation.tap(this.constructor.name, compilation => {
@@ -30,8 +33,9 @@ class WPMLConfigBuilderPlugin {
30
33
  Promise.all(entrypoint.origins.map(origin => origin.request).filter(request => request.endsWith("block.json"))
31
34
  .map(async (request) => JSON.parse(await promises_1.default.readFile(request, 'utf8'))))
32
35
  ]);
36
+ const wpmlEmitPath = node_path_1.default.join(this.destDir, "wpml-config.xml");
33
37
  for (const name of Object.keys(assets)) {
34
- if (name.startsWith("wpml-config.xml")) {
38
+ if (name.startsWith("wpml-config.xml") || name.startsWith(wpmlEmitPath)) {
35
39
  compilation.deleteAsset(name);
36
40
  }
37
41
  }
@@ -141,7 +145,7 @@ class WPMLConfigBuilderPlugin {
141
145
  appendNamedElementsListToConfig("shortcodes", mergedConfig.shortcodes, config);
142
146
  appendNamedElementsListToConfig("taxonomies", mergedConfig.taxonomies, config);
143
147
  this.blockJSONManagingPlugin.additionalMetadata.set("wpml-config", true);
144
- compilation["wpml-config.xml" in compilation.assets ? 'updateAsset' : 'emitAsset']("wpml-config.xml", new webpack_1.sources.RawSource(WPMLConfigBuilderPlugin.prettyPrintXML(config)));
148
+ compilation[wpmlEmitPath in compilation.assets ? 'updateAsset' : 'emitAsset'](wpmlEmitPath, new webpack_1.sources.RawSource(WPMLConfigBuilderPlugin.prettyPrintXML(config)));
145
149
  });
146
150
  });
147
151
  }
@@ -1,12 +1,6 @@
1
1
  import DependencyExtractionWebpackPlugin from "@wordpress/dependency-extraction-webpack-plugin";
2
+ import type { Externals } from "../shared";
2
3
  import type { Configuration } from "webpack";
3
- export type IndividualExternalDepConfig = string | {
4
- import?: string | [string, ...string[]];
5
- handle: string;
6
- };
7
- export type Externals = {
8
- [dep: string]: IndividualExternalDepConfig;
9
- };
10
4
  export declare function makeDependencyExtractionPlugin(externals: Externals | undefined, assumeGlobalizedPlauditLibraries: boolean, wantsGroupedDepData: boolean, externalizing: Required<Configuration>['output']['library']): {
11
5
  instance: DependencyExtractionWebpackPlugin;
12
6
  addExternalizedDep: (dep: string) => void;
package/build/shared.d.ts CHANGED
@@ -1,19 +1,5 @@
1
+ import type { Options as PostcssFunctionsOptions } from "postcss-functions";
1
2
  import type { Configuration } from "webpack";
2
- export type SharedCache = {
3
- specialAssets?: {
4
- files: {
5
- [k: string]: {
6
- preload?: true;
7
- fetchpriority?: string | null;
8
- crossorigin?: string | null;
9
- };
10
- };
11
- };
12
- extensionsConfig?: {
13
- assets: RawAssetData[];
14
- setupFiles: [string, string][];
15
- };
16
- };
17
3
  export type RawAssetData = Record<string, {
18
4
  dependencies: string[];
19
5
  version: string;
@@ -27,13 +13,32 @@ export type HandleData = {
27
13
  in_footer?: boolean;
28
14
  } | boolean];
29
15
  };
16
+ export declare const standardLocationNames: readonly ["clientView", "clientEditor", "admin", "login", "customizer", "analytics"];
17
+ export type StandardLocationNames = typeof standardLocationNames[number];
18
+ export type UsageLocations = {
19
+ [K in StandardLocationNames]?: boolean | number;
20
+ } & {
21
+ register?: boolean | number;
22
+ handle?: string;
23
+ registerScriptArgs?: {
24
+ strategy?: 'defer' | 'async';
25
+ in_footer?: boolean;
26
+ } | boolean;
27
+ };
30
28
  export declare const enum SourceType {
31
29
  blocks = "blocks",
32
30
  extensions = "extensions",
33
31
  plain = "plain"
34
32
  }
35
- export declare function determineCurrentSourceType(dest: string | AdvancedOutputConfig, canCopyFiles: boolean): SourceType;
36
- export interface AdvancedOutputConfig {
33
+ export declare function determineCurrentSourceType(dest: string | AdvancedOutputConfig, srcIsDirectory: boolean): SourceType;
34
+ export type IndividualExternalDepConfig = string | {
35
+ import?: string | [string, ...string[]];
36
+ handle: string;
37
+ };
38
+ export type Externals = {
39
+ [dep: string]: IndividualExternalDepConfig;
40
+ };
41
+ export type AdvancedOutputConfig = {
37
42
  destination: string;
38
43
  withLegacyBlocksIn?: string | undefined;
39
44
  additionalDependencies?: string[];
@@ -41,7 +46,28 @@ export interface AdvancedOutputConfig {
41
46
  assumeGlobalizedPlauditLibraries?: boolean;
42
47
  externalize?: Required<Configuration>['output']['library'];
43
48
  bundleAnalyzer?: boolean;
44
- }
49
+ locations?: UsageLocations;
50
+ };
51
+ export type PlauditWordpressWebpackConfig = {
52
+ standaloneBlocks?: boolean;
53
+ variables?: Record<string, any>;
54
+ verbose?: boolean;
55
+ src: string[] | Record<string, string | AdvancedOutputConfig>;
56
+ stats?: Configuration['stats'];
57
+ postcss?: {
58
+ functions?: (variables: (name: string) => unknown) => PostcssFunctionsOptions['functions'];
59
+ };
60
+ externals?: Externals;
61
+ assumeGlobalizedPlauditLibraries?: boolean;
62
+ processTranslationConfigs?: boolean;
63
+ combineAssetMetadata?: boolean;
64
+ useWebpackResourceFiltering?: boolean;
65
+ outputDir?: string;
66
+ extensionsVersion?: 1 | 2;
67
+ plainEntrypointsHandlePrefix?: string;
68
+ plainEntrypointsVersion?: 1 | 2;
69
+ srcDir?: string;
70
+ };
45
71
  export declare function makeEmittableConfigPHP(data: any): string;
46
72
  export type Sync<V> = {
47
73
  sync: Promise<V>;
@@ -58,4 +84,5 @@ export declare class SyncsManager<V> {
58
84
  get(name: string): Readiness<V>;
59
85
  private makeSync;
60
86
  }
87
+ export declare function leadingSlashIt(pathOrSomething: string): string;
61
88
  export {};
package/build/shared.js CHANGED
@@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SyncsManager = void 0;
6
+ exports.SyncsManager = exports.standardLocationNames = void 0;
7
7
  exports.isRawAssetData = isRawAssetData;
8
8
  exports.determineCurrentSourceType = determineCurrentSourceType;
9
9
  exports.makeEmittableConfigPHP = makeEmittableConfigPHP;
10
- const json_to_php_but_with____injection_1 = __importDefault(require("./wordpress-scripts-wrapper/json-to-php-but-with-__-injection"));
10
+ exports.leadingSlashIt = leadingSlashIt;
11
+ const json_to_php_but_with____injection_1 = __importDefault(require("./utils/json-to-php-but-with-__-injection"));
11
12
  function isRawAssetData(thing) {
12
13
  if (!thing || typeof thing !== 'object') {
13
14
  return false;
@@ -21,12 +22,21 @@ function isRawAssetData(thing) {
21
22
  }
22
23
  return true;
23
24
  }
24
- function determineCurrentSourceType(dest, canCopyFiles) {
25
+ exports.standardLocationNames = ['clientView', 'clientEditor', 'admin', 'login', 'customizer', 'analytics'];
26
+ function determineCurrentSourceType(dest, srcIsDirectory) {
25
27
  if (typeof dest === 'string') {
26
- return canCopyFiles ? "blocks" /* SourceType.blocks */ : "plain" /* SourceType.plain */;
28
+ return srcIsDirectory ? "blocks" /* SourceType.blocks */ : "plain" /* SourceType.plain */;
27
29
  }
28
30
  else {
29
- return dest.directoryLayout ?? (canCopyFiles ? "blocks" /* SourceType.blocks */ : "plain" /* SourceType.plain */);
31
+ if (dest.directoryLayout === undefined) {
32
+ return srcIsDirectory ? "blocks" /* SourceType.blocks */ : "plain" /* SourceType.plain */;
33
+ }
34
+ if (dest.directoryLayout === "extensions" /* SourceType.extensions */ || dest.directoryLayout === "blocks" /* SourceType.blocks */) {
35
+ if (!srcIsDirectory) {
36
+ throw new Error(`The '${dest.directoryLayout}' source type must be associated with a directory`);
37
+ }
38
+ }
39
+ return dest.directoryLayout;
30
40
  }
31
41
  }
32
42
  function makeEmittableConfigPHP(data) {
@@ -57,3 +67,6 @@ class SyncsManager {
57
67
  }
58
68
  }
59
69
  exports.SyncsManager = SyncsManager;
70
+ function leadingSlashIt(pathOrSomething) {
71
+ return pathOrSomething.startsWith('/') ? pathOrSomething : ('/' + pathOrSomething);
72
+ }
@@ -0,0 +1,26 @@
1
+ import type { AdvancedOutputConfig, PlauditWordpressWebpackConfig } from "../shared";
2
+ import type { Compiler, Configuration, EntryObject, WebpackPluginInstance } from "webpack";
3
+ import type WebpackRemoveEmptyScriptsPlugin from "webpack-remove-empty-scripts";
4
+ export type VerifiedPlauditWordpressWebpackConfig = Required<Omit<PlauditWordpressWebpackConfig, 'variables' | 'src' | 'externals'>> & {
5
+ variablesFilePath?: string;
6
+ currentVariables: Record<string, any>;
7
+ } & Pick<PlauditWordpressWebpackConfig, 'externals'>;
8
+ export type CommonPluginConfig = {
9
+ plugins: (WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void))[];
10
+ removeEmptyScriptsPlugin: WebpackRemoveEmptyScriptsPlugin;
11
+ };
12
+ export type CommonConfigProcessingResult = {
13
+ entrypointFields: string[];
14
+ fixedRules: NonNullable<Configuration['module']>['rules'];
15
+ processingModules: boolean | undefined;
16
+ scriptExtension: RegExp;
17
+ updateCurrentVariables: (value: VerifiedPlauditWordpressWebpackConfig['currentVariables']) => unknown;
18
+ };
19
+ export declare const scriptWithoutModuleExtension: RegExp;
20
+ export declare const scriptWithModuleExtension: RegExp;
21
+ export declare const styleExtension: RegExp;
22
+ export declare function scriptOrStyleTest(entryPath: string, scriptExtension: RegExp): "" | "script" | "style";
23
+ export declare function joinPossiblyAbsolutePaths(...paths: (string | undefined)[]): string;
24
+ export declare function groupEntrypointsByAssetFile<T>(entrypoints: T[], entrypointNameExtractor: (t: T) => string): Map<string, T[]>;
25
+ export declare function resolveEntryFromDirectory(commonConfig: CommonConfigProcessingResult, srcRoot: string, dest: AdvancedOutputConfig): () => Promise<EntryObject>;
26
+ export declare function commonMakeWebpackConfig(config: VerifiedPlauditWordpressWebpackConfig, commonConfig: CommonConfigProcessingResult, webpackConfig: Configuration, srcIsDirectory: boolean, dest: string | AdvancedOutputConfig, src: string, srcRoot: string | string[], entry: () => Promise<EntryObject> | EntryObject, plugins: CommonPluginConfig['plugins']): Configuration;