@zohodesk/client_build_tool 0.0.18-exp.2 → 0.0.18-exp.3
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 +27 -5
- package/README.md +27 -5
- package/lib/schemas/defaultConfigValues.js +2 -1
- package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +39 -36
- package/lib/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +8 -4
- package/lib/shared/bundler/webpack/plugins.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Changelog and Release Notes
|
|
2
2
|
|
|
3
|
-
# v0.0.
|
|
3
|
+
# v0.0.19 (06-01-2026)
|
|
4
|
+
|
|
5
|
+
**Feature:-**
|
|
6
|
+
- Added InjectChunkGraphPlugin and added plc and plc function new flow
|
|
7
|
+
- During class name generation, when the template included the file name, it was converted to lowercase by default. Support has now been added to include the file name in class names in a case-insensitive manner.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
css: {
|
|
11
|
+
classNameOptions: {
|
|
12
|
+
caseOnlyFilename: true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Adjustments:-**
|
|
18
|
+
- issue in CssCustomOrderPlugin has been fixed
|
|
19
|
+
|
|
20
|
+
# v0.0.18 (23-12-2025)(issue in CssCustomOrderPlugin)
|
|
4
21
|
|
|
5
22
|
**Adjustments:-**
|
|
6
23
|
- remove the unwanted console in the previous version
|
|
7
24
|
- html not creation issue due to the generate html option fixed
|
|
8
25
|
|
|
9
|
-
# v0.0.17 (22-12-2025)
|
|
26
|
+
# v0.0.17 (22-12-2025) (html not creation issue) (issue in CssCustomOrderPlugin)
|
|
27
|
+
|
|
28
|
+
**revert:-**
|
|
29
|
+
- InjectChunkGraphPlugin and the pfc and plc functions were reverted due to UAT issues unrelated to our tool. Consequently, the plugin could not be included in this version. we rewriting the plc and pfc in resource hints plugins recently, it will function correctly when the new plugin is enabled,so revert this changes from this version
|
|
10
30
|
|
|
11
31
|
**Feature:-**
|
|
12
32
|
- `alias` support for `build:es` and `build:lib`
|
|
@@ -20,7 +40,7 @@
|
|
|
20
40
|
- ChunkHierarchyPlugin.js – modified and rewrite the plugin to get the proper output (this is the stable version of this plugin).
|
|
21
41
|
|
|
22
42
|
|
|
23
|
-
# v0.0.16 (05-11-2025)
|
|
43
|
+
# v0.0.16 (05-11-2025) (deprecated)
|
|
24
44
|
|
|
25
45
|
**Adjustments:-**
|
|
26
46
|
- ChunkHierarchyPlugin.js – Added support for ConcatenatedModule modules.
|
|
@@ -29,7 +49,7 @@
|
|
|
29
49
|
- Source map path correction – The resolving paths in source map files appeared as zohodesk-react/./src, which was incompatible with the Murphy tool. Updated it to zohodesk-react/src by adding a function to devtoolModuleFilenameTemplate in the output configuration.
|
|
30
50
|
- ChunkHierarchyPlugin – Made it active in development mode as well by removing the “run only in production” condition.
|
|
31
51
|
|
|
32
|
-
# v0.0.15 (11-10-2025)
|
|
52
|
+
# v0.0.15 (11-10-2025) (deprecated)
|
|
33
53
|
|
|
34
54
|
**Feature:-**
|
|
35
55
|
- Chunk Dependency Mapping: Added a new feature that generates a JSON file listing all chunk dependencies in the Webpack build
|
|
@@ -46,7 +66,9 @@ To provide clear visibility into chunk relationships and dependencies for debugg
|
|
|
46
66
|
|
|
47
67
|
- Preload Chunk Split Visualization
|
|
48
68
|
Enhanced the Preload Chunk (PLC) mechanism to identify and list the sub-chunks generated from a preloaded parent chunk.
|
|
49
|
-
When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
|
|
69
|
+
When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
|
|
70
|
+
|
|
71
|
+
rewrite the plc and pfc fucntion in resourceHints plugin and created a new plugin to inject the sub chunks of the preloaded chunks in runtime file
|
|
50
72
|
|
|
51
73
|
if resourceHints not enabled plc , pfc and custom function related to this are not created
|
|
52
74
|
|
package/README.md
CHANGED
|
@@ -475,13 +475,33 @@ First Release
|
|
|
475
475
|
- 'templates' command to create es for react library
|
|
476
476
|
# Changelog and Release Notes
|
|
477
477
|
|
|
478
|
-
# v0.0.
|
|
478
|
+
# v0.0.19 (06-01-2026)
|
|
479
|
+
|
|
480
|
+
**Feature:-**
|
|
481
|
+
- Added InjectChunkGraphPlugin and added plc and plc function new flow
|
|
482
|
+
- During class name generation, when the template included the file name, it was converted to lowercase by default. Support has now been added to include the file name in class names in a case-insensitive manner.
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
css: {
|
|
486
|
+
classNameOptions: {
|
|
487
|
+
caseOnlyFilename: true
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Adjustments:-**
|
|
493
|
+
- issue in CssCustomOrderPlugin has been fixed
|
|
494
|
+
|
|
495
|
+
# v0.0.18 (23-12-2025)(issue in CssCustomOrderPlugin)
|
|
479
496
|
|
|
480
497
|
**Adjustments:-**
|
|
481
498
|
- remove the unwanted console in the previous version
|
|
482
499
|
- html not creation issue due to the generate html option fixed
|
|
483
500
|
|
|
484
|
-
# v0.0.17 (22-12-2025)
|
|
501
|
+
# v0.0.17 (22-12-2025) (html not creation issue) (issue in CssCustomOrderPlugin)
|
|
502
|
+
|
|
503
|
+
**revert:-**
|
|
504
|
+
- InjectChunkGraphPlugin and the pfc and plc functions were reverted due to UAT issues unrelated to our tool. Consequently, the plugin could not be included in this version. we rewriting the plc and pfc in resource hints plugins recently, it will function correctly when the new plugin is enabled,so revert this changes from this version
|
|
485
505
|
|
|
486
506
|
**Feature:-**
|
|
487
507
|
- `alias` support for `build:es` and `build:lib`
|
|
@@ -495,7 +515,7 @@ First Release
|
|
|
495
515
|
- ChunkHierarchyPlugin.js – modified and rewrite the plugin to get the proper output (this is the stable version of this plugin).
|
|
496
516
|
|
|
497
517
|
|
|
498
|
-
# v0.0.16 (05-11-2025)
|
|
518
|
+
# v0.0.16 (05-11-2025) (deprecated)
|
|
499
519
|
|
|
500
520
|
**Adjustments:-**
|
|
501
521
|
- ChunkHierarchyPlugin.js – Added support for ConcatenatedModule modules.
|
|
@@ -504,7 +524,7 @@ First Release
|
|
|
504
524
|
- Source map path correction – The resolving paths in source map files appeared as zohodesk-react/./src, which was incompatible with the Murphy tool. Updated it to zohodesk-react/src by adding a function to devtoolModuleFilenameTemplate in the output configuration.
|
|
505
525
|
- ChunkHierarchyPlugin – Made it active in development mode as well by removing the “run only in production” condition.
|
|
506
526
|
|
|
507
|
-
# v0.0.15 (11-10-2025)
|
|
527
|
+
# v0.0.15 (11-10-2025) (deprecated)
|
|
508
528
|
|
|
509
529
|
**Feature:-**
|
|
510
530
|
- Chunk Dependency Mapping: Added a new feature that generates a JSON file listing all chunk dependencies in the Webpack build
|
|
@@ -521,7 +541,9 @@ To provide clear visibility into chunk relationships and dependencies for debugg
|
|
|
521
541
|
|
|
522
542
|
- Preload Chunk Split Visualization
|
|
523
543
|
Enhanced the Preload Chunk (PLC) mechanism to identify and list the sub-chunks generated from a preloaded parent chunk.
|
|
524
|
-
When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
|
|
544
|
+
When a chunk is configured for preloading (e.g., ticket.js), the system now traces and records all the split chunks associated with it
|
|
545
|
+
|
|
546
|
+
rewrite the plc and pfc fucntion in resourceHints plugin and created a new plugin to inject the sub chunks of the preloaded chunks in runtime file
|
|
525
547
|
|
|
526
548
|
if resourceHints not enabled plc , pfc and custom function related to this are not created
|
|
527
549
|
|
|
@@ -22,11 +22,8 @@ const pluginName = 'prefetch-preload-chunk-plugin';
|
|
|
22
22
|
|
|
23
23
|
class ResourceHintsPlugin {
|
|
24
24
|
constructor({
|
|
25
|
-
publicPath
|
|
26
|
-
resourceHints
|
|
25
|
+
publicPath
|
|
27
26
|
}) {
|
|
28
|
-
this.resourceHints = resourceHints;
|
|
29
|
-
this.allowPrefetchingMultipleChunks = resourceHints.allowPrefetchingMultipleChunks;
|
|
30
27
|
this.publicPathsTemplateObj = {
|
|
31
28
|
js: publicPath,
|
|
32
29
|
css: publicPath,
|
|
@@ -53,7 +50,6 @@ class ResourceHintsPlugin {
|
|
|
53
50
|
compilation.addRuntimeModule(entryRuntimeChunk, // eslint-disable-next-line no-use-before-define
|
|
54
51
|
new ResourceHintsRuntimePlugin(compiler, {
|
|
55
52
|
chunk: entryRuntimeChunk,
|
|
56
|
-
allowPrefetchingMultipleChunks: this.allowPrefetchingMultipleChunks,
|
|
57
53
|
publicPathsTemplateObj
|
|
58
54
|
}));
|
|
59
55
|
};
|
|
@@ -69,13 +65,11 @@ exports.default = ResourceHintsPlugin;
|
|
|
69
65
|
class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
70
66
|
constructor(compiler, {
|
|
71
67
|
chunk,
|
|
72
|
-
publicPathsTemplateObj
|
|
73
|
-
allowPrefetchingMultipleChunks
|
|
68
|
+
publicPathsTemplateObj
|
|
74
69
|
}) {
|
|
75
70
|
super('ResourceHintsRuntimePlugin loading', 10);
|
|
76
71
|
this.compiler = compiler;
|
|
77
72
|
this.publicPathsTemplateObj = publicPathsTemplateObj;
|
|
78
|
-
this.allowPrefetchingMultipleChunks = allowPrefetchingMultipleChunks;
|
|
79
73
|
this.chunk = chunk;
|
|
80
74
|
}
|
|
81
75
|
|
|
@@ -85,7 +79,7 @@ class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
|
85
79
|
} = this;
|
|
86
80
|
const idNameMap = chunk.getChunkMaps().name;
|
|
87
81
|
const nameIdMap = {};
|
|
88
|
-
let needsMap =
|
|
82
|
+
let needsMap = false;
|
|
89
83
|
Object.keys(idNameMap).forEach(key => {
|
|
90
84
|
const value = idNameMap[key];
|
|
91
85
|
nameIdMap[value] = key;
|
|
@@ -111,7 +105,7 @@ class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
|
111
105
|
*/
|
|
112
106
|
|
|
113
107
|
return _webpack.Template.asString([`const ntc = ${JSON.stringify(needsMap ? nameIdMap : {})};
|
|
114
|
-
|
|
108
|
+
// const cns = Object.keys(ntc);
|
|
115
109
|
|
|
116
110
|
function clt(href, rel) {
|
|
117
111
|
let link = document.createElement("link");
|
|
@@ -129,8 +123,8 @@ class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
|
129
123
|
//return !url.includes(".undefined.");
|
|
130
124
|
return url.indexOf(".undefined") === -1;
|
|
131
125
|
}
|
|
132
|
-
function lpp(
|
|
133
|
-
let chunkId = ${_webpack.RuntimeGlobals.require}.getChunkId(_chunkId);
|
|
126
|
+
function lpp(chunkId, rel) {
|
|
127
|
+
// let chunkId = ${_webpack.RuntimeGlobals.require}.getChunkId(_chunkId);
|
|
134
128
|
// ${_webpack.RuntimeGlobals.require}.e(chunkId);
|
|
135
129
|
if(__webpack_require__.O.j(chunkId)) {
|
|
136
130
|
return;
|
|
@@ -145,33 +139,29 @@ class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
|
145
139
|
}
|
|
146
140
|
}
|
|
147
141
|
|
|
148
|
-
${_webpack.RuntimeGlobals.require}.getChunkId = function getChunkId(
|
|
149
|
-
|
|
150
|
-
return chunkId;
|
|
142
|
+
${_webpack.RuntimeGlobals.require}.getChunkId = function getChunkId(chunkName) {
|
|
143
|
+
return ntc[chunkName]||chunkName;
|
|
151
144
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if(isRegExAsChunkId) {
|
|
157
|
-
return cns.filter(chunkName => chunkId.test(chunkName)).map(chunkName => ntc[chunkName]);
|
|
158
|
-
}
|
|
159
|
-
return [${_webpack.RuntimeGlobals.require}.getChunkId(chunkId)];
|
|
160
|
-
` : `return [${_webpack.RuntimeGlobals.require}.getChunkId(chunkId)];`}
|
|
161
|
-
}
|
|
162
|
-
// Prefetch a chunk (${pluginName})
|
|
163
|
-
${_webpack.RuntimeGlobals.require}.pfc = function prefetchChunk(chunkId) {
|
|
145
|
+
|
|
146
|
+
// Preload a chunk (${pluginName})
|
|
147
|
+
${_webpack.RuntimeGlobals.require}.plc = function preloadChunk(chunkId) {
|
|
148
|
+
const preloadChunkGraph = __PRELOAD_CHUNK_GRAPH__
|
|
164
149
|
${`
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
})
|
|
150
|
+
if (typeof preloadChunkGraph !== 'object' || !preloadChunkGraph) return;
|
|
151
|
+
preloadChunkGraph[chunkId].forEach(idOfAChunk => {
|
|
152
|
+
${_webpack.RuntimeGlobals.require}.e(idOfAChunk);
|
|
153
|
+
})
|
|
154
|
+
// let idOfAChunk = ${_webpack.RuntimeGlobals.require}.getChunkId(chunkId);
|
|
155
|
+
// chunkIds.forEach(idOfAChunk => {
|
|
156
|
+
// ${_webpack.RuntimeGlobals.require}.e(idOfAChunk);
|
|
157
|
+
// })
|
|
158
|
+
`}
|
|
169
159
|
};
|
|
170
160
|
|
|
171
|
-
//
|
|
172
|
-
${_webpack.RuntimeGlobals.require}.
|
|
173
|
-
let idOfAChunk = ${_webpack.RuntimeGlobals.require}.
|
|
174
|
-
lpp(idOfAChunk, "
|
|
161
|
+
// Prefetch a chunk (${pluginName})
|
|
162
|
+
${_webpack.RuntimeGlobals.require}.pfc = function prefetchChunk(chunkId) {
|
|
163
|
+
let idOfAChunk = ${_webpack.RuntimeGlobals.require}.getChunkId(chunkId);
|
|
164
|
+
lpp(idOfAChunk, "prefetch");
|
|
175
165
|
}
|
|
176
166
|
` // `// Prefetch a chunk (${pluginName})`,
|
|
177
167
|
// `${RuntimeGlobals.require}.pfc = function prefetchChunk(chunkId) {`,
|
|
@@ -190,4 +180,17 @@ class ResourceHintsRuntimePlugin extends _webpack.RuntimeModule {
|
|
|
190
180
|
]);
|
|
191
181
|
}
|
|
192
182
|
|
|
193
|
-
}
|
|
183
|
+
} // ${RuntimeGlobals.require}.getChunkIds = function getChunkIds(chunkId) {
|
|
184
|
+
// ${
|
|
185
|
+
// // eslint-disable-next-line no-nested-ternary
|
|
186
|
+
// this.allowPrefetchingMultipleChunks
|
|
187
|
+
// ? `
|
|
188
|
+
// const isRegExAsChunkId = chunkId instanceof RegExp;
|
|
189
|
+
// if(isRegExAsChunkId) {
|
|
190
|
+
// return cns.filter(chunkName => chunkId.test(chunkName)).map(chunkName => ntc[chunkName]);
|
|
191
|
+
// }
|
|
192
|
+
// return [${RuntimeGlobals.require}.getChunkId(chunkId)];
|
|
193
|
+
// `
|
|
194
|
+
// : `return [${RuntimeGlobals.require}.getChunkId(chunkId)];`
|
|
195
|
+
// }
|
|
196
|
+
// }
|
|
@@ -14,8 +14,12 @@ function configResourceHintsPlugin(options) {
|
|
|
14
14
|
publicPath,
|
|
15
15
|
resourceHints
|
|
16
16
|
} = options;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
|
|
18
|
+
if (resourceHints.enable) {
|
|
19
|
+
return new _ResourceHintsPlugin.default({
|
|
20
|
+
publicPath: JSON.stringify(publicPath)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return null;
|
|
21
25
|
}
|
|
@@ -62,5 +62,5 @@ function plugins(options) {
|
|
|
62
62
|
const {
|
|
63
63
|
webpackPlugins
|
|
64
64
|
} = options;
|
|
65
|
-
return [(0, _configEnvVariables.configEnvVariables)(options), (0, _configCustomAttributesPlugin.configCustomAttributesPlugin)(options), (0, _configTPHashMappingPlugin.configTPHashMappingPlugin)(options), (0, _configCopyPublicFolders.configCopyPublicFolders)(options), (0, _configIgnorePlugin.configIgnorePlugin)(options), (0, _configMiniCSSExtractPlugin.configMiniCSSExtractPlugin)(options), (0, _configSelectorWeightPlugin.configSelectorWeightPlugin)(options), (0, _configVariableConversionPlugin.configVariableConversionPlugin)(options), (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options), (0, _configRtlCssPlugin.configRtlCssPlugin)(options), (0, _configHtmlWebpackPlugin.configHtmlWebpackPlugin)(options), (0, _configCustomScriptLoadingStrategyPlugin.configCustomScriptLoadingStrategyPlugin)(options), (0, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configEFCTemplatePlugin.configEFCTemplatePlugin)(options), (0, _configResourceHintsPlugin.configResourceHintsPlugin)(options), (0, _configBundleAnalyzer.configBundleAnalyzer)(options), (0, _configManifestJsonPlugin.configManifestJsonPlugin)(options), (0, _configSourceMapPlugin.configSourceMapPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options), (0, _configBundleIntegrityReport.configBundleIntegrityReport)(options), (0, _configRuntimeResourceCleanup.configRuntimeResourceCleanup)(options), (0, _configMurphyInjectorPlugin.configMurphyInjectorPlugin)(options), (0, _configCssCustomOrderPlugin.configCssCustomOrderPlugin)(options), (0, _configChunkHierarchyPlugin.configChunkHierarchyPlugin)(options), ...webpackPlugins].filter(Boolean);
|
|
65
|
+
return [(0, _configEnvVariables.configEnvVariables)(options), (0, _configCustomAttributesPlugin.configCustomAttributesPlugin)(options), (0, _configTPHashMappingPlugin.configTPHashMappingPlugin)(options), (0, _configCopyPublicFolders.configCopyPublicFolders)(options), (0, _configIgnorePlugin.configIgnorePlugin)(options), (0, _configMiniCSSExtractPlugin.configMiniCSSExtractPlugin)(options), (0, _configSelectorWeightPlugin.configSelectorWeightPlugin)(options), (0, _configVariableConversionPlugin.configVariableConversionPlugin)(options), (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options), (0, _configRtlCssPlugin.configRtlCssPlugin)(options), (0, _configHtmlWebpackPlugin.configHtmlWebpackPlugin)(options), (0, _configCustomScriptLoadingStrategyPlugin.configCustomScriptLoadingStrategyPlugin)(options), (0, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configEFCTemplatePlugin.configEFCTemplatePlugin)(options), (0, _configResourceHintsPlugin.configResourceHintsPlugin)(options), (0, _configBundleAnalyzer.configBundleAnalyzer)(options), (0, _configManifestJsonPlugin.configManifestJsonPlugin)(options), (0, _configSourceMapPlugin.configSourceMapPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options), (0, _configBundleIntegrityReport.configBundleIntegrityReport)(options), (0, _configRuntimeResourceCleanup.configRuntimeResourceCleanup)(options), (0, _configMurphyInjectorPlugin.configMurphyInjectorPlugin)(options), (0, _configCssCustomOrderPlugin.configCssCustomOrderPlugin)(options), (0, _configChunkHierarchyPlugin.configChunkHierarchyPlugin)(options), (0, _configInjectChunkGraphPlugin.configInjectChunkGraphPlugin)(options), ...webpackPlugins].filter(Boolean);
|
|
66
66
|
}
|