@plaudit/webpack-extensions 2.42.1 → 2.42.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.
|
@@ -418,7 +418,11 @@ class BlockJSONManagingPlugin {
|
|
|
418
418
|
...blockDirConfigs.map(entry => [entry[0], Object.fromEntries(Object.entries(entry[1]).filter(e => e[0] !== '$schema'))])
|
|
419
419
|
]);
|
|
420
420
|
}
|
|
421
|
-
compilation.emitAsset("blockdir.config.php", new webpack_1.sources.RawSource("<?php return "
|
|
421
|
+
compilation.emitAsset("blockdir.config.php", new webpack_1.sources.RawSource("<?php return "
|
|
422
|
+
+ json2php_1.default.make({ indent: "\t", linebreak: "\n", shortArraySyntax: true })(sortedBlockDirConfigData, "")
|
|
423
|
+
.replaceAll(/(\n\t*)\[\s+],/gs, "$1[],")
|
|
424
|
+
.replaceAll(/'rest' => \[\n\t+\[],\n\t+('[^']+')\n\t+]/gs, "'rest' => [[], $1]")
|
|
425
|
+
+ ";"));
|
|
422
426
|
});
|
|
423
427
|
}
|
|
424
428
|
static normalizeRenderTemplate(json, pathsNeedRemapping, sourceDir, outputDir, compilation) {
|