@plaudit/webpack-extensions 2.56.4 → 2.57.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.
- package/build/plugins/BlockJSONManagingPlugin.d.ts +1 -0
- package/build/plugins/BlockJSONManagingPlugin.js +17 -0
- package/build/plugins/ExtensionsConfigFileGeneratorPlugin.d.ts +2 -1
- package/build/plugins/ExtensionsConfigFileGeneratorPlugin.js +29 -2
- package/build/plugins/PlainEntrypointsConfigFileGeneratorPlugin.d.ts +3 -4
- package/build/plugins/PlainEntrypointsConfigFileGeneratorPlugin.js +21 -17
- package/build/plugins/SpecialAssetHandlingPlugin.d.ts +3 -3
- package/build/plugins/SpecialAssetHandlingPlugin.js +16 -11
- package/build/plugins/UnifiedLoaderGenerator.d.ts +10 -0
- package/build/plugins/UnifiedLoaderGenerator.js +48 -0
- package/build/shared.d.ts +3 -0
- package/build/shared.js +9 -0
- package/build/utils/pseduo-semaphore.d.ts +3 -1
- package/build/utils/pseduo-semaphore.js +13 -1
- package/build/wordpress-scripts-wrapper.js +36 -6
- package/package.json +2 -2
|
@@ -12,6 +12,7 @@ export declare class BlockJSONManagingPlugin implements WebpackPluginInstance {
|
|
|
12
12
|
private static readonly blockJsonAssetKeyMapping;
|
|
13
13
|
private static readonly syncsManager;
|
|
14
14
|
readonly additionalMetadata: Map<string, any>;
|
|
15
|
+
private readonly id;
|
|
15
16
|
constructor(standaloneBlocks: boolean, processingModules: boolean | undefined, blocksDest: string);
|
|
16
17
|
static recordRawDependency(entrypoint: string, dependency: string): void;
|
|
17
18
|
static recordBlockJSONAssetSourceDir(entrypoint: string, source: string): void;
|
|
@@ -9,6 +9,8 @@ const node_fs_1 = __importDefault(require("node:fs"));
|
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const shared_1 = require("../shared");
|
|
11
11
|
const webpack_1 = require("webpack");
|
|
12
|
+
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
13
|
+
const php_writer_1 = require("../utils/php-writer");
|
|
12
14
|
class BlockJSONManagingPlugin {
|
|
13
15
|
standaloneBlocks;
|
|
14
16
|
processingModules;
|
|
@@ -22,10 +24,15 @@ class BlockJSONManagingPlugin {
|
|
|
22
24
|
static blockJsonAssetKeyMapping = new Map();
|
|
23
25
|
static syncsManager = new shared_1.SyncsManager();
|
|
24
26
|
additionalMetadata = new Map();
|
|
27
|
+
id;
|
|
25
28
|
constructor(standaloneBlocks, processingModules, blocksDest) {
|
|
26
29
|
this.standaloneBlocks = standaloneBlocks;
|
|
27
30
|
this.processingModules = processingModules;
|
|
28
31
|
this.blocksDest = blocksDest;
|
|
32
|
+
this.id = Math.random().toString();
|
|
33
|
+
if (!this.processingModules) {
|
|
34
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.register(this.id);
|
|
35
|
+
}
|
|
29
36
|
}
|
|
30
37
|
static recordRawDependency(entrypoint, dependency) {
|
|
31
38
|
let deps = BlockJSONManagingPlugin.blockJsonRawDependenciesMap.get(entrypoint);
|
|
@@ -42,6 +49,7 @@ class BlockJSONManagingPlugin {
|
|
|
42
49
|
this.additionalMetadata.clear();
|
|
43
50
|
this.registerAssetProcessor(compilation);
|
|
44
51
|
if (!this.processingModules) {
|
|
52
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
45
53
|
this.registerBlockJsonProcessor(compilation);
|
|
46
54
|
}
|
|
47
55
|
});
|
|
@@ -312,6 +320,15 @@ class BlockJSONManagingPlugin {
|
|
|
312
320
|
}
|
|
313
321
|
registerBlockJsonProcessor(compilation) {
|
|
314
322
|
const blockDirConfigData = {};
|
|
323
|
+
compilation.hooks.processAssets.tap({ name: `${this.constructor.name}_UnifiedLoaderGeneratorIntegration`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_DERIVED }, () => {
|
|
324
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.resolve(this.id, ['block.json', writer => {
|
|
325
|
+
writer
|
|
326
|
+
.use("Plaudit\\Common\\ACF\\BlockManager")
|
|
327
|
+
.action("init", writer => {
|
|
328
|
+
writer.call("BlockManager::autoloadSubfolders", [new php_writer_1.Expr(`__DIR__.${php_writer_1.Expr.convertJsonToPHP("/" + this.blocksDest)}`)]);
|
|
329
|
+
});
|
|
330
|
+
}]);
|
|
331
|
+
});
|
|
315
332
|
compilation.hooks.afterProcessAssets.tap(`${this.constructor.name}_GenerateMetadata`, compilationAssets => {
|
|
316
333
|
const currentBlockJSONAssets = BlockJSONManagingPlugin.blockJSONAssetSourceDirs.entries()
|
|
317
334
|
.filter(([name]) => name in compilationAssets)
|
|
@@ -3,10 +3,11 @@ export declare class ExtensionsConfigFileGeneratorPlugin implements WebpackPlugi
|
|
|
3
3
|
private readonly extensionsPath;
|
|
4
4
|
private readonly version;
|
|
5
5
|
private readonly extensionsDest;
|
|
6
|
+
private readonly handlePrefix;
|
|
6
7
|
private static readonly semaphore;
|
|
7
8
|
private static cache;
|
|
8
9
|
private readonly id;
|
|
9
|
-
constructor(extensionsPath: string, version: 1 | 2, extensionsDest: string);
|
|
10
|
+
constructor(extensionsPath: string, version: 1 | 2, extensionsDest: string, handlePrefix: string);
|
|
10
11
|
apply(compiler: Compiler): void;
|
|
11
12
|
private makeVersionOneAfterProcessAssets;
|
|
12
13
|
private stripExtensionsDest;
|
|
@@ -10,19 +10,24 @@ const shared_1 = require("../shared");
|
|
|
10
10
|
const php_serializer_1 = require("../utils/php-serializer");
|
|
11
11
|
const pseduo_semaphore_1 = require("../utils/pseduo-semaphore");
|
|
12
12
|
const webpack_1 = require("webpack");
|
|
13
|
+
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
14
|
+
const php_writer_1 = require("../utils/php-writer");
|
|
13
15
|
class ExtensionsConfigFileGeneratorPlugin {
|
|
14
16
|
extensionsPath;
|
|
15
17
|
version;
|
|
16
18
|
extensionsDest;
|
|
17
|
-
|
|
19
|
+
handlePrefix;
|
|
20
|
+
static semaphore = new pseduo_semaphore_1.PseudoSemaphore({ assets: [], setupFiles: [] }, "Extensions");
|
|
18
21
|
static cache = undefined;
|
|
19
22
|
id;
|
|
20
|
-
constructor(extensionsPath, version, extensionsDest) {
|
|
23
|
+
constructor(extensionsPath, version, extensionsDest, handlePrefix) {
|
|
21
24
|
this.extensionsPath = extensionsPath;
|
|
22
25
|
this.version = version;
|
|
23
26
|
this.extensionsDest = extensionsDest;
|
|
27
|
+
this.handlePrefix = handlePrefix;
|
|
24
28
|
this.id = Math.random().toString();
|
|
25
29
|
ExtensionsConfigFileGeneratorPlugin.semaphore.register(this.id);
|
|
30
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.register(this.id);
|
|
26
31
|
}
|
|
27
32
|
apply(compiler) {
|
|
28
33
|
compiler.hooks.make.tapPromise(this.constructor.name, async (compilation) => {
|
|
@@ -46,6 +51,20 @@ class ExtensionsConfigFileGeneratorPlugin {
|
|
|
46
51
|
compiler.hooks.compilation.tap(this.constructor.name, compilation => {
|
|
47
52
|
ExtensionsConfigFileGeneratorPlugin.cache = undefined;
|
|
48
53
|
ExtensionsConfigFileGeneratorPlugin.semaphore.reset(this.id);
|
|
54
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
55
|
+
compilation.hooks.processAssets.tap({ name: `${this.constructor.name}_UnifiedLoaderGeneratorIntegration`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_DERIVED }, () => {
|
|
56
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.resolve(this.id, ['extensions-config-v2', writer => {
|
|
57
|
+
writer
|
|
58
|
+
.use("Plaudit\\Base\\API\\ThemeUtils")
|
|
59
|
+
.call("trailingslashit", [new php_writer_1.Expr(`__DIR__.${php_writer_1.Expr.convertJsonToPHP("/" + this.extensionsDest)}`)], { assignTo: "$filePathPrefix" })
|
|
60
|
+
.call("plaudit_webpack_extensions__resolve_base_uri", [new php_writer_1.Expr(`__DIR__.'/${this.extensionsDest}'`)], { assignTo: "$fileUriPrefix" })
|
|
61
|
+
.call("ThemeUtils::loadExtensionsV2", [
|
|
62
|
+
new php_writer_1.Expr(`$filePathPrefix.'mapping.config.php'`), new php_writer_1.Expr("$filePathPrefix"), new php_writer_1.Expr("$fileUriPrefix"),
|
|
63
|
+
`${this.handlePrefix ? this.handlePrefix : node_path_1.default.basename(process.cwd())}_extension_`
|
|
64
|
+
])
|
|
65
|
+
.call("unset", [new php_writer_1.Expr("$filePathPrefix"), new php_writer_1.Expr("$fileUriPrefix")]);
|
|
66
|
+
}]);
|
|
67
|
+
});
|
|
49
68
|
compilation.hooks.processAssets.tapPromise(tapName, async (assets) => {
|
|
50
69
|
try {
|
|
51
70
|
//TODO: Add handling of extracted CSS from JS
|
|
@@ -144,6 +163,14 @@ class ExtensionsConfigFileGeneratorPlugin {
|
|
|
144
163
|
}
|
|
145
164
|
else {
|
|
146
165
|
compiler.hooks.thisCompilation.tap(this.constructor.name, compilation => {
|
|
166
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
167
|
+
compilation.hooks.processAssets.tap({ name: `${this.constructor.name}_UnifiedLoaderGeneratorIntegration`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_DERIVED }, () => {
|
|
168
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.resolve(this.id, ['extensions-config-v1', writer => {
|
|
169
|
+
writer
|
|
170
|
+
.use("Plaudit\\Base\\API\\ThemeUtils")
|
|
171
|
+
.call("ThemeUtils::installExtensionSupport", [new php_writer_1.Expr(`__DIR__.${php_writer_1.Expr.convertJsonToPHP(this.extensionsDest)}`)]);
|
|
172
|
+
}]);
|
|
173
|
+
});
|
|
147
174
|
compilation.hooks.afterProcessAssets.tap(`${this.constructor.name}_AfterProcessAssets`, this.makeVersionOneAfterProcessAssets(compilation));
|
|
148
175
|
});
|
|
149
176
|
}
|
|
@@ -6,13 +6,13 @@ export declare class PlainEntrypointsConfigFileGeneratorPlugin implements Webpac
|
|
|
6
6
|
private readonly outputDir;
|
|
7
7
|
private readonly usageLocations;
|
|
8
8
|
private readonly handlePrefix;
|
|
9
|
+
private readonly useUnifiedLoader;
|
|
9
10
|
private static readonly semaphore;
|
|
10
11
|
private static cache?;
|
|
11
12
|
private readonly id;
|
|
12
|
-
constructor(buildRoot: string, outputDir: string, usageLocations: UsageLocations, handlePrefix: string);
|
|
13
|
+
constructor(buildRoot: string, outputDir: string, usageLocations: UsageLocations, handlePrefix: string, useUnifiedLoader: boolean);
|
|
13
14
|
apply(compiler: Compiler): void;
|
|
14
|
-
private
|
|
15
|
-
private static getEmitPath;
|
|
15
|
+
private afterProcessAssets;
|
|
16
16
|
private static addHandlesToHandleLists;
|
|
17
17
|
private static appendEnqueuingHandleLists;
|
|
18
18
|
private static separateHandleListByPriority;
|
|
@@ -21,4 +21,3 @@ export declare class PlainEntrypointsConfigFileGeneratorPlugin implements Webpac
|
|
|
21
21
|
*/
|
|
22
22
|
static emitResolveBaseUriFunction(writer: PHPWriter): void;
|
|
23
23
|
}
|
|
24
|
-
export declare function kebabCase(value: string): string;
|
|
@@ -4,40 +4,48 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PlainEntrypointsConfigFileGeneratorPlugin = void 0;
|
|
7
|
-
exports.kebabCase = kebabCase;
|
|
8
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
8
|
const shared_1 = require("../shared");
|
|
10
9
|
const php_writer_1 = require("../utils/php-writer");
|
|
11
10
|
const pseduo_semaphore_1 = require("../utils/pseduo-semaphore");
|
|
12
11
|
const webpack_1 = require("webpack");
|
|
12
|
+
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
13
13
|
class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
14
14
|
buildRoot;
|
|
15
15
|
outputDir;
|
|
16
16
|
usageLocations;
|
|
17
17
|
handlePrefix;
|
|
18
|
-
|
|
18
|
+
useUnifiedLoader;
|
|
19
|
+
static semaphore = new pseduo_semaphore_1.PseudoSemaphore([], "Plain");
|
|
19
20
|
static cache = undefined;
|
|
20
21
|
id;
|
|
21
|
-
constructor(buildRoot, outputDir, usageLocations, handlePrefix) {
|
|
22
|
+
constructor(buildRoot, outputDir, usageLocations, handlePrefix, useUnifiedLoader) {
|
|
22
23
|
this.buildRoot = buildRoot;
|
|
23
24
|
this.outputDir = outputDir;
|
|
24
25
|
this.usageLocations = usageLocations;
|
|
25
26
|
this.handlePrefix = handlePrefix;
|
|
27
|
+
this.useUnifiedLoader = useUnifiedLoader;
|
|
26
28
|
this.id = Math.random().toString();
|
|
27
29
|
PlainEntrypointsConfigFileGeneratorPlugin.semaphore.register(this.id);
|
|
30
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.register(this.id);
|
|
28
31
|
}
|
|
29
32
|
apply(compiler) {
|
|
30
33
|
const tapName = { name: `${this.constructor.name}_ProcessPlainEntrypointFiles`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_REPORT };
|
|
31
34
|
compiler.hooks.compilation.tap(this.constructor.name, compilation => {
|
|
32
35
|
PlainEntrypointsConfigFileGeneratorPlugin.cache = undefined;
|
|
33
36
|
PlainEntrypointsConfigFileGeneratorPlugin.semaphore.reset(this.id);
|
|
37
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
38
|
+
compilation.hooks.processAssets.tap({ name: `${this.constructor.name}_UnifiedLoaderGeneratorIntegration`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_DERIVED }, () => {
|
|
39
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.resolve(this.id, ['plain-entrypoints-v2', writer => {
|
|
40
|
+
writer.append("require_once __DIR__.'/plain-entrypoints-loader.php';");
|
|
41
|
+
}]);
|
|
42
|
+
});
|
|
34
43
|
compilation.hooks.processAssets.tapPromise(tapName, async (assets) => {
|
|
35
44
|
try {
|
|
36
|
-
const emitDir = node_path_1.default.join(this.buildRoot, this.outputDir);
|
|
37
45
|
if (PlainEntrypointsConfigFileGeneratorPlugin.cache === undefined) {
|
|
38
46
|
PlainEntrypointsConfigFileGeneratorPlugin.cache = { assets: [] };
|
|
39
47
|
compilation.hooks.afterProcessAssets.tap(`${this.constructor.name}_CompileLoader`, () => {
|
|
40
|
-
|
|
48
|
+
this.afterProcessAssets(compilation);
|
|
41
49
|
});
|
|
42
50
|
}
|
|
43
51
|
const rawAssetDataSource = assets["assets.json"]?.source();
|
|
@@ -100,12 +108,14 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
100
108
|
}
|
|
101
109
|
catch (e) {
|
|
102
110
|
PlainEntrypointsConfigFileGeneratorPlugin.semaphore.reject(this.id);
|
|
111
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reject(this.id);
|
|
103
112
|
throw e;
|
|
104
113
|
}
|
|
105
114
|
});
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
|
-
|
|
117
|
+
afterProcessAssets(compilation) {
|
|
118
|
+
const emitDir = node_path_1.default.join(this.buildRoot, this.outputDir);
|
|
109
119
|
//TODO: Add support for editorStyles via the 'block_editor_settings_all' filter
|
|
110
120
|
const handleLists = {
|
|
111
121
|
register: [],
|
|
@@ -135,7 +145,7 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
135
145
|
}
|
|
136
146
|
else {
|
|
137
147
|
const basename = node_path_1.default.basename(src).replace(/_(?:script(?:-\d+)?\.js|style(?:-\d+)?\.css)$|(?<!_(script|style))\.(js|css)$/, "");
|
|
138
|
-
const baseFinalHandleName = `${handlePrefix}.${kebabCase(basename)}`;
|
|
148
|
+
const baseFinalHandleName = `${handlePrefix}.${(0, shared_1.kebabCase)(basename)}`;
|
|
139
149
|
const handleNameMap = (isScript ? usedScriptHandleNames : usedStyleHandleNames);
|
|
140
150
|
finalHandleName = baseFinalHandleName;
|
|
141
151
|
for (let count = 0; finalHandleName in handleNameMap && handleNameMap[finalHandleName] !== src;) {
|
|
@@ -163,7 +173,9 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
163
173
|
}
|
|
164
174
|
const writer = new php_writer_1.PHPWriter();
|
|
165
175
|
if (handleLists.register.length > 0) {
|
|
166
|
-
|
|
176
|
+
if (!this.useUnifiedLoader) {
|
|
177
|
+
PlainEntrypointsConfigFileGeneratorPlugin.emitResolveBaseUriFunction(writer);
|
|
178
|
+
}
|
|
167
179
|
for (const [priority, prioritizedHandleList] of PlainEntrypointsConfigFileGeneratorPlugin.separateHandleListByPriority(handleLists.register)) {
|
|
168
180
|
writer.action("init", writer => {
|
|
169
181
|
writer.call("plaudit_webpack_extensions__resolve_base_uri", [new php_writer_1.Expr('__DIR__')], { assignTo: "$base_uri" });
|
|
@@ -185,11 +197,7 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
185
197
|
}
|
|
186
198
|
}
|
|
187
199
|
PlainEntrypointsConfigFileGeneratorPlugin.appendEnqueuingHandleLists(writer, handleLists);
|
|
188
|
-
|
|
189
|
-
writer.emitAsset(compilation, assetPath);
|
|
190
|
-
}
|
|
191
|
-
static getEmitPath(compilation, emitDir) {
|
|
192
|
-
return node_path_1.default.relative(compilation.outputOptions.path ?? process.cwd(), node_path_1.default.join(emitDir, "plain-entrypoints-loader.php"));
|
|
200
|
+
writer.emitAsset(compilation, "plain-entrypoints-loader.php");
|
|
193
201
|
}
|
|
194
202
|
static addHandlesToHandleLists(type, handles, handleLists) {
|
|
195
203
|
for (const [handle, data] of handles) {
|
|
@@ -263,7 +271,3 @@ class PlainEntrypointsConfigFileGeneratorPlugin {
|
|
|
263
271
|
}
|
|
264
272
|
}
|
|
265
273
|
exports.PlainEntrypointsConfigFileGeneratorPlugin = PlainEntrypointsConfigFileGeneratorPlugin;
|
|
266
|
-
function kebabCase(value) {
|
|
267
|
-
const kebabCaseRegexes = [[/([a-z])([A-Z])/g, "$1-$2"], [/[\s_.\-]+/g, "-"]];
|
|
268
|
-
return kebabCaseRegexes.reduce((str, [pattern, replacement]) => str.replace(pattern, replacement), value).toLowerCase();
|
|
269
|
-
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Compiler, type WebpackPluginInstance } from "webpack";
|
|
2
2
|
export declare class SpecialAssetHandlingPlugin implements WebpackPluginInstance {
|
|
3
3
|
private readonly outputDir;
|
|
4
|
+
private readonly useUnifiedLoader;
|
|
4
5
|
private static readonly semaphore;
|
|
5
|
-
private static readonly previouslyIncludedFilenames;
|
|
6
6
|
private static hasAttachedAssetCollatorForCurrentBatch;
|
|
7
7
|
private static validPathname?;
|
|
8
8
|
private readonly id;
|
|
9
|
-
constructor(outputDir: string);
|
|
9
|
+
constructor(outputDir: string, useUnifiedLoader: boolean);
|
|
10
10
|
apply(compiler: Compiler): void;
|
|
11
11
|
private collateAssets;
|
|
12
12
|
}
|
|
@@ -8,22 +8,32 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
8
8
|
const PlainEntrypointsConfigFileGeneratorPlugin_1 = require("./PlainEntrypointsConfigFileGeneratorPlugin");
|
|
9
9
|
const php_writer_1 = require("../utils/php-writer");
|
|
10
10
|
const pseduo_semaphore_1 = require("../utils/pseduo-semaphore");
|
|
11
|
+
const webpack_1 = require("webpack");
|
|
12
|
+
const UnifiedLoaderGenerator_1 = require("./UnifiedLoaderGenerator");
|
|
11
13
|
class SpecialAssetHandlingPlugin {
|
|
12
14
|
outputDir;
|
|
13
|
-
|
|
14
|
-
static
|
|
15
|
+
useUnifiedLoader;
|
|
16
|
+
static semaphore = new pseduo_semaphore_1.PseudoSemaphore({}, "Special");
|
|
15
17
|
static hasAttachedAssetCollatorForCurrentBatch = false;
|
|
16
18
|
static validPathname = undefined;
|
|
17
19
|
id;
|
|
18
|
-
constructor(outputDir) {
|
|
20
|
+
constructor(outputDir, useUnifiedLoader) {
|
|
19
21
|
this.outputDir = outputDir;
|
|
22
|
+
this.useUnifiedLoader = useUnifiedLoader;
|
|
20
23
|
this.id = Math.random().toString();
|
|
21
24
|
SpecialAssetHandlingPlugin.semaphore.register(this.id);
|
|
25
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.register(this.id);
|
|
22
26
|
}
|
|
23
27
|
apply(compiler) {
|
|
24
28
|
compiler.hooks.compilation.tap(this.constructor.name, compilation => {
|
|
25
29
|
SpecialAssetHandlingPlugin.hasAttachedAssetCollatorForCurrentBatch = false;
|
|
26
30
|
SpecialAssetHandlingPlugin.semaphore.reset(this.id);
|
|
31
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
32
|
+
compilation.hooks.processAssets.tap({ name: `${this.constructor.name}_UnifiedLoaderGeneratorIntegration`, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_DERIVED }, () => {
|
|
33
|
+
UnifiedLoaderGenerator_1.UnifiedLoaderGenerator.semaphore.resolve(this.id, ['special-assets', writer => {
|
|
34
|
+
writer.append("require_once __DIR__.'/special-assets.php';");
|
|
35
|
+
}]);
|
|
36
|
+
});
|
|
27
37
|
compilation.hooks.processAssets.tapPromise(this.constructor.name, async (assets) => {
|
|
28
38
|
try {
|
|
29
39
|
const specialAssetData = {};
|
|
@@ -38,13 +48,6 @@ class SpecialAssetHandlingPlugin {
|
|
|
38
48
|
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
49
|
const queryStart = assetInfo.sourceFilename.indexOf('?');
|
|
40
50
|
if (queryStart < 0) {
|
|
41
|
-
if (SpecialAssetHandlingPlugin.previouslyIncludedFilenames.has(filename)) {
|
|
42
|
-
specialAssetData[filename] = {
|
|
43
|
-
preload: false,
|
|
44
|
-
fetchpriority: null,
|
|
45
|
-
crossorigin: null
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
51
|
continue;
|
|
49
52
|
}
|
|
50
53
|
const params = new URLSearchParams(assetInfo.sourceFilename.substring(queryStart + 1)
|
|
@@ -84,7 +87,9 @@ class SpecialAssetHandlingPlugin {
|
|
|
84
87
|
writer.emitAsset(compilation, outputFile);
|
|
85
88
|
return;
|
|
86
89
|
}
|
|
87
|
-
|
|
90
|
+
if (!this.useUnifiedLoader) {
|
|
91
|
+
PlainEntrypointsConfigFileGeneratorPlugin_1.PlainEntrypointsConfigFileGeneratorPlugin.emitResolveBaseUriFunction(writer);
|
|
92
|
+
}
|
|
88
93
|
writer.action("wp_head", writer => {
|
|
89
94
|
writer.call("plaudit_webpack_extensions__resolve_base_uri", [new php_writer_1.Expr('__DIR__')], { assignTo: "$base_uri" }).closePHP();
|
|
90
95
|
for (let [filename, { preload, fetchpriority, crossorigin }] of preloadedAssets) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PseudoSemaphore } from "../utils/pseduo-semaphore";
|
|
2
|
+
import { PHPWriter } from "../utils/php-writer";
|
|
3
|
+
import { Compiler, WebpackPluginInstance } from "webpack";
|
|
4
|
+
export declare class UnifiedLoaderGenerator implements WebpackPluginInstance {
|
|
5
|
+
static readonly semaphore: PseudoSemaphore<[string, (writer: PHPWriter) => void] | undefined>;
|
|
6
|
+
private static attached;
|
|
7
|
+
private readonly id;
|
|
8
|
+
constructor();
|
|
9
|
+
apply(compiler: Compiler): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnifiedLoaderGenerator = void 0;
|
|
4
|
+
const pseduo_semaphore_1 = require("../utils/pseduo-semaphore");
|
|
5
|
+
const php_writer_1 = require("../utils/php-writer");
|
|
6
|
+
const webpack_1 = require("webpack");
|
|
7
|
+
const PlainEntrypointsConfigFileGeneratorPlugin_1 = require("./PlainEntrypointsConfigFileGeneratorPlugin");
|
|
8
|
+
class UnifiedLoaderGenerator {
|
|
9
|
+
static semaphore = new pseduo_semaphore_1.PseudoSemaphore(undefined, "Unified");
|
|
10
|
+
static attached = false;
|
|
11
|
+
id;
|
|
12
|
+
constructor() {
|
|
13
|
+
this.id = Math.random().toString();
|
|
14
|
+
UnifiedLoaderGenerator.semaphore.register(this.id);
|
|
15
|
+
}
|
|
16
|
+
apply(compiler) {
|
|
17
|
+
const tapName = { name: this.constructor.name, stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_REPORT };
|
|
18
|
+
compiler.hooks.compilation.tap(this.constructor.name, compilation => {
|
|
19
|
+
UnifiedLoaderGenerator.attached = false;
|
|
20
|
+
UnifiedLoaderGenerator.semaphore.reset(this.id);
|
|
21
|
+
compilation.hooks.processAssets.tapPromise(tapName, async () => {
|
|
22
|
+
try {
|
|
23
|
+
UnifiedLoaderGenerator.semaphore.resolve(this.id, undefined);
|
|
24
|
+
if (!UnifiedLoaderGenerator.attached) {
|
|
25
|
+
UnifiedLoaderGenerator.attached = true;
|
|
26
|
+
const writerCallbacks = Object.values(Object.fromEntries((await UnifiedLoaderGenerator.semaphore.wait())
|
|
27
|
+
.filter(a => a !== undefined))); // A simple deduplication trick
|
|
28
|
+
if (writerCallbacks.length > 0) {
|
|
29
|
+
compilation.hooks.afterProcessAssets.tap(this.constructor.name, () => {
|
|
30
|
+
const writer = new php_writer_1.PHPWriter();
|
|
31
|
+
PlainEntrypointsConfigFileGeneratorPlugin_1.PlainEntrypointsConfigFileGeneratorPlugin.emitResolveBaseUriFunction(writer);
|
|
32
|
+
for (const writerCallback of writerCallbacks) {
|
|
33
|
+
writerCallback(writer);
|
|
34
|
+
}
|
|
35
|
+
writer.emitAsset(compilation, "unified-loader.php");
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
UnifiedLoaderGenerator.semaphore.reject(this.id);
|
|
42
|
+
throw e;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.UnifiedLoaderGenerator = UnifiedLoaderGenerator;
|
package/build/shared.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export type PlauditWordpressWebpackConfig = {
|
|
|
69
69
|
plainEntrypointsVersion?: 1 | 2;
|
|
70
70
|
srcDir?: string;
|
|
71
71
|
srcPrefixes?: string[];
|
|
72
|
+
useUnifiedLoader?: boolean;
|
|
72
73
|
};
|
|
73
74
|
export declare function makeEmittableConfigPHP(data: any): string;
|
|
74
75
|
export type Sync<V> = {
|
|
@@ -92,4 +93,6 @@ export declare const scriptWithoutModuleExtension: RegExp;
|
|
|
92
93
|
export declare const scriptWithModuleExtension: RegExp;
|
|
93
94
|
export declare const styleExtension: RegExp;
|
|
94
95
|
export declare function scriptOrStyleTest(entryPath: string, scriptExtension: RegExp): "" | "script" | "style";
|
|
96
|
+
export declare function hasAtLeastOneItem<T>(list: T[]): list is [T, ...T[]];
|
|
97
|
+
export declare function kebabCase(value: string): string;
|
|
95
98
|
export {};
|
package/build/shared.js
CHANGED
|
@@ -9,6 +9,8 @@ exports.determineCurrentSourceType = determineCurrentSourceType;
|
|
|
9
9
|
exports.makeEmittableConfigPHP = makeEmittableConfigPHP;
|
|
10
10
|
exports.leadingSlashIt = leadingSlashIt;
|
|
11
11
|
exports.scriptOrStyleTest = scriptOrStyleTest;
|
|
12
|
+
exports.hasAtLeastOneItem = hasAtLeastOneItem;
|
|
13
|
+
exports.kebabCase = kebabCase;
|
|
12
14
|
const json_to_php_but_with____injection_1 = __importDefault(require("./utils/json-to-php-but-with-__-injection"));
|
|
13
15
|
function isRawAssetData(thing) {
|
|
14
16
|
if (!thing || typeof thing !== 'object') {
|
|
@@ -78,3 +80,10 @@ exports.styleExtension = /(?<filename>.+)(?<extension>\.(p?c|sa)ss)$/i;
|
|
|
78
80
|
function scriptOrStyleTest(entryPath, scriptExtension) {
|
|
79
81
|
return scriptExtension.test(entryPath) ? "script" : (exports.styleExtension.test(entryPath) ? "style" : "");
|
|
80
82
|
}
|
|
83
|
+
function hasAtLeastOneItem(list) {
|
|
84
|
+
return list.length > 0;
|
|
85
|
+
}
|
|
86
|
+
function kebabCase(value) {
|
|
87
|
+
const kebabCaseRegexes = [[/([a-z])([A-Z])/g, "$1-$2"], [/[\s_.\-]+/g, "-"]];
|
|
88
|
+
return kebabCaseRegexes.reduce((str, [pattern, replacement]) => str.replace(pattern, replacement), value).toLowerCase();
|
|
89
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare class PseudoSemaphore<T> {
|
|
2
2
|
private readonly defaultValue;
|
|
3
|
+
private readonly name;
|
|
3
4
|
private flagSet;
|
|
4
5
|
private readonly flags;
|
|
5
|
-
|
|
6
|
+
private readonly debugMode;
|
|
7
|
+
constructor(defaultValue: T, name: string);
|
|
6
8
|
register(id: string): void;
|
|
7
9
|
resolve(id: string, value: T): void;
|
|
8
10
|
reject(id: string): void;
|
|
@@ -3,10 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PseudoSemaphore = void 0;
|
|
4
4
|
class PseudoSemaphore {
|
|
5
5
|
defaultValue;
|
|
6
|
+
name;
|
|
6
7
|
flagSet = 0;
|
|
7
8
|
flags = new Map();
|
|
8
|
-
|
|
9
|
+
debugMode = false;
|
|
10
|
+
constructor(defaultValue, name) {
|
|
9
11
|
this.defaultValue = defaultValue;
|
|
12
|
+
this.name = name;
|
|
10
13
|
}
|
|
11
14
|
register(id) {
|
|
12
15
|
if (this.flags.has(id)) {
|
|
@@ -16,16 +19,25 @@ class PseudoSemaphore {
|
|
|
16
19
|
this.resolve(id, this.defaultValue);
|
|
17
20
|
}
|
|
18
21
|
resolve(id, value) {
|
|
22
|
+
if (this.debugMode) {
|
|
23
|
+
console.error("RESOLVED:", this.name, id);
|
|
24
|
+
}
|
|
19
25
|
const flag = this.getFlag(id);
|
|
20
26
|
flag[1].resolve(value); // This is deliberately unsafe - I would rather see a cascading failure than a silent one
|
|
21
27
|
flag[2] = true;
|
|
22
28
|
}
|
|
23
29
|
reject(id) {
|
|
30
|
+
if (this.debugMode) {
|
|
31
|
+
console.error("REJECTED:", this.name, id);
|
|
32
|
+
}
|
|
24
33
|
const flag = this.getFlag(id);
|
|
25
34
|
flag[1].reject(); // This is deliberately unsafe - I would rather see a cascading failure than a silent one
|
|
26
35
|
flag[2] = true;
|
|
27
36
|
}
|
|
28
37
|
reset(id) {
|
|
38
|
+
if (this.debugMode) {
|
|
39
|
+
console.error("RESET:", this.name, id);
|
|
40
|
+
}
|
|
29
41
|
const flag = this.getFlag(id);
|
|
30
42
|
// We reject if we reset early to avoid any permanently-hanging promises
|
|
31
43
|
if (!flag[2]) {
|
|
@@ -22,6 +22,7 @@ const dependency_extraction_webpack_plugin_config_builder_1 = require("./plugins
|
|
|
22
22
|
const dependency_extraction_webpack_plugin_1 = __importDefault(require("@wordpress/dependency-extraction-webpack-plugin"));
|
|
23
23
|
const fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
24
24
|
const webpack_remove_empty_scripts_1 = __importDefault(require("webpack-remove-empty-scripts"));
|
|
25
|
+
const UnifiedLoaderGenerator_1 = require("./plugins/UnifiedLoaderGenerator");
|
|
25
26
|
function resolveLegacyBlockScriptsInFolder(folder) {
|
|
26
27
|
const blockScriptEntrypoints = [];
|
|
27
28
|
for (const blockDir of node_fs_1.default.readdirSync(folder)) {
|
|
@@ -168,7 +169,7 @@ function injectSupportForInliningSVGsAsStrings(rules) {
|
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
171
|
function buildVerifiedConfig(config) {
|
|
171
|
-
const { standaloneBlocks = false, stats = 'errors-warnings', variables: rawVariables, verbose = process.argv.includes('--verbose') || process.env['VERBOSE'] === 'true', postcss = {}, externals, assumeGlobalizedPlauditLibraries = true, processTranslationConfigs = true, combineAssetMetadata = true, useWebpackResourceFiltering = true, outputDir = "", extensionsVersion = 1,
|
|
172
|
+
const { standaloneBlocks = false, stats = 'errors-warnings', variables: rawVariables, verbose = process.argv.includes('--verbose') || process.env['VERBOSE'] === 'true', postcss = {}, externals, assumeGlobalizedPlauditLibraries = true, processTranslationConfigs = true, combineAssetMetadata = true, useWebpackResourceFiltering = true, outputDir = "", extensionsVersion = 1, plainEntrypointsVersion = 1, srcDir = "", useUnifiedLoader = true } = config;
|
|
172
173
|
let srcPrefixes;
|
|
173
174
|
const trailingSlashedSrcDir = srcDir && !srcDir.endsWith("/") ? srcDir + "/" : srcDir;
|
|
174
175
|
if (config.srcPrefixes === undefined) {
|
|
@@ -177,9 +178,13 @@ function buildVerifiedConfig(config) {
|
|
|
177
178
|
else {
|
|
178
179
|
srcPrefixes = (srcDir && !config.srcPrefixes.includes(trailingSlashedSrcDir) ? [...config.srcPrefixes, trailingSlashedSrcDir] : config.srcPrefixes);
|
|
179
180
|
}
|
|
181
|
+
let plainEntrypointsHandlePrefix = config.plainEntrypointsHandlePrefix ?? "";
|
|
180
182
|
if (plainEntrypointsVersion > 1) {
|
|
181
183
|
if (!plainEntrypointsHandlePrefix) {
|
|
182
|
-
|
|
184
|
+
plainEntrypointsHandlePrefix = derivePlainEntrypointsHandlePrefixFromComposerJsonOrThemeName();
|
|
185
|
+
if (!plainEntrypointsHandlePrefix) {
|
|
186
|
+
throw new Error("Plain Entrypoints V2 and higher require either 'plainEntrypointsHandlePrefix' to be set or an adjacent composer.json or style.css file to be present");
|
|
187
|
+
}
|
|
183
188
|
}
|
|
184
189
|
if (!outputDir) {
|
|
185
190
|
throw new Error("Plain Entrypoints V2 and higher require 'outputDir' to be set");
|
|
@@ -233,7 +238,7 @@ function buildVerifiedConfig(config) {
|
|
|
233
238
|
}
|
|
234
239
|
const cfg = {
|
|
235
240
|
currentVariables, postcss, standaloneBlocks, stats, variablesFilePath, verbose, externals, assumeGlobalizedPlauditLibraries, processTranslationConfigs, combineAssetMetadata,
|
|
236
|
-
useWebpackResourceFiltering, outputDir, extensionsVersion, plainEntrypointsVersion, plainEntrypointsHandlePrefix, srcDir, srcPrefixes
|
|
241
|
+
useWebpackResourceFiltering, outputDir, extensionsVersion, plainEntrypointsVersion, plainEntrypointsHandlePrefix, srcDir, srcPrefixes, useUnifiedLoader
|
|
237
242
|
};
|
|
238
243
|
return cfg.outputDir ? { cfg, sources } : withDerivedOutputDir(cfg, sources);
|
|
239
244
|
}
|
|
@@ -279,6 +284,28 @@ function finalizeEntryDestination(entry, dynamicEffectiveDestinationsWithExpecte
|
|
|
279
284
|
allocatedDestinations[derivedDestination] = entry[0];
|
|
280
285
|
return [entry[0], { ...entry[1], destination: derivedDestination }];
|
|
281
286
|
}
|
|
287
|
+
function derivePlainEntrypointsHandlePrefixFromComposerJsonOrThemeName() {
|
|
288
|
+
let composerJson;
|
|
289
|
+
try {
|
|
290
|
+
composerJson = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(process.cwd(), "composer.json"), 'utf-8'));
|
|
291
|
+
}
|
|
292
|
+
catch {
|
|
293
|
+
// Then composer.json doesn't exist
|
|
294
|
+
return derivePlainEntrypointsHandlePrefixFromThemeName();
|
|
295
|
+
}
|
|
296
|
+
if (typeof composerJson !== 'object' || typeof composerJson.name !== 'string' || !composerJson.name) {
|
|
297
|
+
throw new ReferenceError("plainEntrypointsHandlePrefix was not set and the adjacent composer.json file does not have a valid name in it");
|
|
298
|
+
}
|
|
299
|
+
return (0, shared_1.kebabCase)(composerJson.name.replace(/plaudit\/plaudit/, 'plaudit'));
|
|
300
|
+
}
|
|
301
|
+
function derivePlainEntrypointsHandlePrefixFromThemeName() {
|
|
302
|
+
const styleFileContents = node_fs_1.default.readFileSync(node_path_1.default.join(process.cwd(), "style.css"), 'utf-8');
|
|
303
|
+
const themeName = /^\W*Theme\s*Name:\s*(.+)$/im.exec(styleFileContents)?.[1]?.trim();
|
|
304
|
+
if (!themeName) {
|
|
305
|
+
throw new ReferenceError("plainEntrypointsHandlePrefix was not set and the adjacent style.css file does not have a valid name in it");
|
|
306
|
+
}
|
|
307
|
+
return (0, shared_1.kebabCase)(themeName);
|
|
308
|
+
}
|
|
282
309
|
function withDerivedOutputDir(cfg, sources) {
|
|
283
310
|
const destinations = sources.map(([_, { destination }]) => destination.split(/[\/\\]/g));
|
|
284
311
|
if (destinations.length < 2) {
|
|
@@ -353,8 +380,11 @@ function buildCommonPluginConfig(srcRoot, scriptExtension, webpackConfig, dest,
|
|
|
353
380
|
extensions: ['css', 'scss', 'sass', 'less', 'styl', 'pcss']
|
|
354
381
|
});
|
|
355
382
|
plugins.push(removeEmptyScriptsPlugin, new MiniCSSExtractPluginErrorCleaner_1.MiniCSSExtractPluginErrorCleaner());
|
|
383
|
+
if (config.useUnifiedLoader) {
|
|
384
|
+
plugins.push(new UnifiedLoaderGenerator_1.UnifiedLoaderGenerator());
|
|
385
|
+
}
|
|
356
386
|
if (config.useWebpackResourceFiltering) {
|
|
357
|
-
plugins.push(new SpecialAssetHandlingPlugin_1.SpecialAssetHandlingPlugin(config.outputDir));
|
|
387
|
+
plugins.push(new SpecialAssetHandlingPlugin_1.SpecialAssetHandlingPlugin(config.outputDir, config.useUnifiedLoader));
|
|
358
388
|
}
|
|
359
389
|
if (variablesFilePath) {
|
|
360
390
|
plugins.push(new VariablesJSMonitorPlugin_1.VariablesJSMonitorPlugin(variablesFilePath));
|
|
@@ -467,7 +497,7 @@ function makeBlocksWebpackConfig(config, commonConfig, webpackConfig, dest, src,
|
|
|
467
497
|
return (0, common_config_helpers_1.commonMakeWebpackConfig)(config, commonConfig, webpackConfig, true, dest, src, srcRoot, (0, common_config_helpers_1.resolveEntryFromDirectory)(commonConfig, srcRoot, dest), plugins);
|
|
468
498
|
}
|
|
469
499
|
function makeExtensionsWebpackConfig(config, commonConfig, webpackConfig, dest, src, srcRoot, plugins) {
|
|
470
|
-
plugins.push(new ExtensionsConfigFileGeneratorPlugin_1.ExtensionsConfigFileGeneratorPlugin(srcRoot, config.extensionsVersion, dest.destination));
|
|
500
|
+
plugins.push(new ExtensionsConfigFileGeneratorPlugin_1.ExtensionsConfigFileGeneratorPlugin(srcRoot, config.extensionsVersion, dest.destination, config.plainEntrypointsHandlePrefix));
|
|
471
501
|
const entry = async () => {
|
|
472
502
|
const rawEntrypoints = [];
|
|
473
503
|
for await (const dirent of await promises_1.default.opendir(srcRoot)) {
|
|
@@ -490,7 +520,7 @@ function makePlainV1WebpackConfig(config, commonConfig, webpackConfig, dest, src
|
|
|
490
520
|
return (0, common_config_helpers_1.commonMakeWebpackConfig)(config, commonConfig, webpackConfig, srcIsDirectory, dest, src, srcRoot, entry, plugins);
|
|
491
521
|
}
|
|
492
522
|
function makePlainV2WebpackConfig(config, commonConfig, webpackConfig, dest, src, srcRoot, plugins, srcIsDirectory) {
|
|
493
|
-
plugins.push(new PlainEntrypointsConfigFileGeneratorPlugin_1.PlainEntrypointsConfigFileGeneratorPlugin(process.cwd(), config.outputDir, dest.locations ?? {}, config.plainEntrypointsHandlePrefix));
|
|
523
|
+
plugins.push(new PlainEntrypointsConfigFileGeneratorPlugin_1.PlainEntrypointsConfigFileGeneratorPlugin(process.cwd(), config.outputDir, dest.locations ?? {}, config.plainEntrypointsHandlePrefix, config.useUnifiedLoader));
|
|
494
524
|
const baseDest = stripExtension(dest.destination);
|
|
495
525
|
const entry = srcIsDirectory // This being true implies that srcRoot is not an array
|
|
496
526
|
? (0, common_config_helpers_1.resolveEntryFromDirectory)(commonConfig, srcRoot, dest)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/webpack-extensions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.57.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"/build"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"postcss-url": "^10.1.3",
|
|
64
64
|
"react": "^18.3.1",
|
|
65
65
|
"react-dom": "^18.3.1",
|
|
66
|
-
"webpack": "^5.101.
|
|
66
|
+
"webpack": "^5.101.1",
|
|
67
67
|
"webpack-remove-empty-scripts": "^1.1.1",
|
|
68
68
|
"xml-formatter": "^3.6.6"
|
|
69
69
|
},
|