@plaudit/webpack-extensions 2.45.1 → 2.46.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.
|
@@ -404,7 +404,7 @@ class BlockJSONManagingPlugin {
|
|
|
404
404
|
if (Array.isArray(cfg)) {
|
|
405
405
|
for (let i = 0; i < cfg.length; i++) {
|
|
406
406
|
const assetDetails = BlockJSONManagingPlugin
|
|
407
|
-
.getAssetDetails(blockFolder, cfg[i], rawAssetData, derivedFilesMap, mappableKey, usedHandles);
|
|
407
|
+
.getAssetDetails(blockFolder, config["name"], cfg[i], rawAssetData, derivedFilesMap, mappableKey, usedHandles);
|
|
408
408
|
if (assetDetails) {
|
|
409
409
|
(assetDetails.isCss ? styleHandles : scriptHandles)[assetDetails.handle] = assetDetails.handleData;
|
|
410
410
|
cfg[i] = assetDetails.handle;
|
|
@@ -413,7 +413,7 @@ class BlockJSONManagingPlugin {
|
|
|
413
413
|
}
|
|
414
414
|
else {
|
|
415
415
|
const assetDetails = BlockJSONManagingPlugin
|
|
416
|
-
.getAssetDetails(blockFolder, cfg, rawAssetData, derivedFilesMap, mappableKey, usedHandles);
|
|
416
|
+
.getAssetDetails(blockFolder, config["name"], cfg, rawAssetData, derivedFilesMap, mappableKey, usedHandles);
|
|
417
417
|
if (assetDetails) {
|
|
418
418
|
(assetDetails.isCss ? styleHandles : scriptHandles)[assetDetails.handle] = assetDetails.handleData;
|
|
419
419
|
config[mappableKey] = assetDetails.handle;
|
|
@@ -509,7 +509,7 @@ class BlockJSONManagingPlugin {
|
|
|
509
509
|
});
|
|
510
510
|
return res;
|
|
511
511
|
}
|
|
512
|
-
static getAssetDetails(blockFolder, asset, rawAssetData, derivedFilesMap, mappableKey, usedHandles) {
|
|
512
|
+
static getAssetDetails(blockFolder, blockName, asset, rawAssetData, derivedFilesMap, mappableKey, usedHandles) {
|
|
513
513
|
if (!asset.startsWith("file:./")) {
|
|
514
514
|
return undefined;
|
|
515
515
|
}
|
|
@@ -541,6 +541,9 @@ class BlockJSONManagingPlugin {
|
|
|
541
541
|
return undefined;
|
|
542
542
|
}
|
|
543
543
|
let handle = src.substring(0, src.length - (isCss ? 4 : 3));
|
|
544
|
+
if (blockName && handle.startsWith(blockName.substring(blockName.indexOf("/") + 1) + "/")) {
|
|
545
|
+
handle = blockName + handle.substring(handle.indexOf("/"));
|
|
546
|
+
}
|
|
544
547
|
if (usedHandles[isCss ? 'css' : 'js'][handle] !== undefined) {
|
|
545
548
|
handle += "-" + (++usedHandles[isCss ? 'css' : 'js'][handle]);
|
|
546
549
|
}
|
package/package.json
CHANGED
|
@@ -1,91 +1,76 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"pnpm": {
|
|
78
|
-
"onlyBuiltDependencies": [
|
|
79
|
-
"core-js",
|
|
80
|
-
"core-js-pure"
|
|
81
|
-
],
|
|
82
|
-
"ignoredBuiltDependencies": [
|
|
83
|
-
"@parcel/watcher"
|
|
84
|
-
],
|
|
85
|
-
"overrides": {
|
|
86
|
-
"micromatch": "^4",
|
|
87
|
-
"react-autosize-textarea>react": "*",
|
|
88
|
-
"react-autosize-textarea>react-dom": "*"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
2
|
+
"name": "@plaudit/webpack-extensions",
|
|
3
|
+
"version": "2.46.0",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"files": [
|
|
6
|
+
"/build"
|
|
7
|
+
],
|
|
8
|
+
"exports": {
|
|
9
|
+
"./wordpress-scripts-wrapper": "./build/wordpress-scripts-wrapper.js"
|
|
10
|
+
},
|
|
11
|
+
"typesVersions": {
|
|
12
|
+
"*": {
|
|
13
|
+
"wordpress-scripts-wrapper": [
|
|
14
|
+
"build/wordpress-scripts-wrapper.d.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@plaudit/gutenberg-api-extensions": "^2.66.1",
|
|
20
|
+
"@types/browser-sync-webpack-plugin": "^2.2.5",
|
|
21
|
+
"@types/node": "^22.15.3",
|
|
22
|
+
"@types/postcss-functions": "^4.0.4",
|
|
23
|
+
"@types/tapable": "^2.2.7",
|
|
24
|
+
"@types/webpack": "^5.28.5",
|
|
25
|
+
"@types/webpack-sources": "^3.2.3",
|
|
26
|
+
"postcss-load-config": "^4.0.2",
|
|
27
|
+
"postcss-loader": "^7.3.4",
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"typescript": "^5.8.3"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@plaudit/postcss-color-function": "^5.0.0",
|
|
33
|
+
"@plaudit/postcss-legacy-shorthand": "^1.0.0",
|
|
34
|
+
"@plaudit/postcss-silent-extend": "^3.0.0",
|
|
35
|
+
"@plaudit/postcss-strip-units": "^3.0.0",
|
|
36
|
+
"@plaudit/postcss-variables": "^1.1.0",
|
|
37
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.22.0",
|
|
38
|
+
"@wordpress/scripts": "^30.15.0",
|
|
39
|
+
"autoprefixer": "^10.4.21",
|
|
40
|
+
"browser-sync": "^3.0.4",
|
|
41
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
42
|
+
"copy-webpack-plugin": "^10.2.4",
|
|
43
|
+
"cssnano": "^6.1.2",
|
|
44
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
|
45
|
+
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
46
|
+
"http-proxy-middleware": "^3.0.5",
|
|
47
|
+
"json2php": "^0.0.12",
|
|
48
|
+
"postcss": "^8.5.3",
|
|
49
|
+
"postcss-calc": "^9.0.1",
|
|
50
|
+
"postcss-discard-comments": "^6.0.2",
|
|
51
|
+
"postcss-fallback": "^0.1.0",
|
|
52
|
+
"postcss-functions": "^4.0.2",
|
|
53
|
+
"postcss-import": "^16.1.0",
|
|
54
|
+
"postcss-inline-svg": "^6.0.0",
|
|
55
|
+
"postcss-media-minmax": "^5.0.0",
|
|
56
|
+
"postcss-mixins": "6.2.3",
|
|
57
|
+
"postcss-nested": "^6.2.0",
|
|
58
|
+
"postcss-property-lookup": "^3.0.0",
|
|
59
|
+
"postcss-quantity-queries": "^0.5.0",
|
|
60
|
+
"postcss-reporter": "^7.1.0",
|
|
61
|
+
"postcss-simple-vars": "^7.0.1",
|
|
62
|
+
"postcss-url": "^10.1.3",
|
|
63
|
+
"react": "^18.3.1",
|
|
64
|
+
"react-dom": "^18.3.1",
|
|
65
|
+
"webpack": "^5.99.7",
|
|
66
|
+
"webpack-remove-empty-scripts": "^1.0.4",
|
|
67
|
+
"xml-formatter": "^3.6.5"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=20"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "tsc",
|
|
74
|
+
"watch": "tsc -w"
|
|
75
|
+
}
|
|
76
|
+
}
|