@zohodesk/client_build_tool 0.0.11-exp.16 → 0.0.11-exp.16.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.
Files changed (226) hide show
  1. package/README.md +0 -204
  2. package/README_backup.md +0 -204
  3. package/docs/DYNAMIC_TEMPLATE_EXAMPLE.md +129 -0
  4. package/docs/I18N_NUMERIC_INDEXING_PLUGIN.md +225 -0
  5. package/docs/I18N_SINGLE_FILE_MODE.md +126 -0
  6. package/docs/client_build_tool_source_doc.md +390 -0
  7. package/example-single-file-config.js +59 -0
  8. package/lib/allCommandsConfigs.js +2 -7
  9. package/lib/commands/build/commandExecutor.js +1 -5
  10. package/lib/commands/build/config.js +2 -3
  11. package/lib/commands/build/optionsProcessor.js +2 -5
  12. package/lib/commands/build/preProcessor.js +0 -2
  13. package/lib/commands/buildEs/commandExecutor.js +0 -5
  14. package/lib/commands/buildEs/config.js +2 -3
  15. package/lib/commands/buildEs/preProcessor.js +0 -2
  16. package/lib/commands/buildLib/commandExecutor.js +0 -5
  17. package/lib/commands/buildLib/config.js +2 -3
  18. package/lib/commands/buildLib/preProcessor.js +0 -2
  19. package/lib/commands/mockserver/commandExecutor.js +2 -9
  20. package/lib/commands/mockserver/config.js +2 -3
  21. package/lib/commands/pre_process/commandExecutor.js +0 -2
  22. package/lib/commands/pre_process/config.js +2 -3
  23. package/lib/commands/start/commandExecutor.js +0 -2
  24. package/lib/commands/start/config.js +2 -3
  25. package/lib/commands/start/optionsProcessor.js +2 -4
  26. package/lib/commands/start/preProcessor.js +0 -2
  27. package/lib/commands/template/commandExecutor.js +0 -7
  28. package/lib/commands/template/config.js +2 -3
  29. package/lib/commands/version/commandExecutor.js +0 -3
  30. package/lib/commands/version/config.js +2 -3
  31. package/lib/commandsRouter.js +5 -21
  32. package/lib/index.js +0 -2
  33. package/lib/logger.js +0 -5
  34. package/lib/schemas/applyValuesToSchema/index.js +0 -8
  35. package/lib/schemas/applyValuesToSchema/isObject.js +0 -1
  36. package/lib/schemas/applyValuesToSchema/isValid.js +0 -2
  37. package/lib/schemas/cliArgsToObject.js +2 -6
  38. package/lib/schemas/defaultConfigValues.js +31 -7
  39. package/lib/schemas/defaultConfigValuesOnly.js +4 -7
  40. package/lib/schemas/deprecatedOptionsHandler.js +7 -16
  41. package/lib/schemas/getNpmVersion.js +0 -5
  42. package/lib/schemas/giveDefaultValue.js +0 -3
  43. package/lib/schemas/npmConfigToObject.js +2 -5
  44. package/lib/schemas/readOptions.js +10 -30
  45. package/lib/schemas/readOptionsForConfigFile.js +2 -12
  46. package/lib/shared/babel/addDefaultPlugins.js +0 -2
  47. package/lib/shared/babel/babelWebConfig.js +1 -10
  48. package/lib/shared/babel/babel_plugins/removeAttributesPlugin.js +0 -4
  49. package/lib/shared/babel/getBabelPlugin.js +2 -7
  50. package/lib/shared/babel/runBabelForJSFile.js +1 -4
  51. package/lib/shared/babel/runBabelForTsFile.js +1 -5
  52. package/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -5
  53. package/lib/shared/bundler/webpack/common/libAlias.js +3 -3
  54. package/lib/shared/bundler/webpack/common/modeUtils.js +0 -5
  55. package/lib/shared/bundler/webpack/common/nameTemplates.js +11 -18
  56. package/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +2 -3
  57. package/lib/shared/bundler/webpack/configCustomLoaders.js +0 -1
  58. package/lib/shared/bundler/webpack/cssLoaders.js +0 -2
  59. package/lib/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/index.js +1 -20
  60. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/index.js +20 -25
  61. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +4 -9
  62. package/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +3 -23
  63. package/lib/shared/bundler/webpack/custom_plugins/EFCTemplatePlugin.js +8 -19
  64. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nGroupRuntimeModule.js +120 -0
  65. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexHtmlInjectorPlugin.js +81 -0
  66. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin.js +328 -0
  67. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/utils/i18nDataLoader.js +135 -0
  68. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nFilesEmitPlugin.js +5 -26
  69. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +13 -16
  70. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nRuntimeDealerPlugin.js +19 -53
  71. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/LocaleChunkAssetsStore.js +2 -17
  72. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ModulesI18nKeysStore.js +0 -13
  73. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +11 -21
  74. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -4
  75. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +4 -14
  76. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +3 -13
  77. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/iterateModulesInChunk.js +3 -12
  78. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +2 -7
  79. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -2
  80. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +2 -3
  81. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +2 -4
  82. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +8 -13
  83. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +2 -14
  84. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/getChunkModules.js +0 -1
  85. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +1 -3
  86. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -4
  87. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +20 -22
  88. package/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +3 -10
  89. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +1 -6
  90. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +1 -6
  91. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +0 -6
  92. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/findInitialFileNames.js +0 -1
  93. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/index.js +0 -7
  94. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/removeHashFromFileName.js +0 -1
  95. package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +13 -17
  96. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +6 -15
  97. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +4 -13
  98. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +4 -6
  99. package/lib/shared/bundler/webpack/custom_plugins/RuntimeResourceCleanup/index.js +0 -10
  100. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/classHandling.js +0 -3
  101. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/index.js +4 -20
  102. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/selectorWeightPrefixAdder.js +10 -12
  103. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/windowsModification.js +2 -3
  104. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +7 -20
  105. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +0 -1
  106. package/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +7 -10
  107. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/addHashToFilePath.js +1 -6
  108. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -16
  109. package/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/index.js.js +4 -11
  110. package/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js +3 -10
  111. package/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/index.js +27 -62
  112. package/lib/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +3 -15
  113. package/lib/shared/bundler/webpack/custom_plugins/emitAsset.js +0 -1
  114. package/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +2 -12
  115. package/lib/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +2 -7
  116. package/lib/shared/bundler/webpack/defaultVendorPatternList.js +2 -6
  117. package/lib/shared/bundler/webpack/devtoolConfig.js +0 -1
  118. package/lib/shared/bundler/webpack/entryConfig.js +0 -4
  119. package/lib/shared/bundler/webpack/externals.js +0 -1
  120. package/lib/shared/bundler/webpack/getCSSLoaders.js +1 -6
  121. package/lib/shared/bundler/webpack/getFilenameFromModule.js +1 -5
  122. package/lib/shared/bundler/webpack/jsLoaders.js +23 -4
  123. package/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -2
  124. package/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +2 -3
  125. package/lib/shared/bundler/webpack/loaderConfigs/checkIsPatternsMatchFilename.js +3 -12
  126. package/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -1
  127. package/lib/shared/bundler/webpack/loaderConfigs/configPostCssLoader.js +2 -10
  128. package/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -2
  129. package/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -12
  130. package/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +1 -15
  131. package/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +1 -4
  132. package/lib/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +72 -0
  133. package/lib/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +113 -0
  134. package/lib/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +2 -2
  135. package/lib/shared/bundler/webpack/loaders/workerLoader.js +8 -19
  136. package/lib/shared/bundler/webpack/optimizationConfig.js +5 -13
  137. package/lib/shared/bundler/webpack/outputConfig.js +1 -9
  138. package/lib/shared/bundler/webpack/pluginConfigs/configBundleAnalyzer.js +5 -9
  139. package/lib/shared/bundler/webpack/pluginConfigs/configBundleIntegrityReport.js +0 -5
  140. package/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +4 -9
  141. package/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +3 -8
  142. package/lib/shared/bundler/webpack/pluginConfigs/configCopyPublicFolders.js +1 -16
  143. package/lib/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +0 -4
  144. package/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +0 -16
  145. package/lib/shared/bundler/webpack/pluginConfigs/configEFCTemplatePlugin.js +0 -5
  146. package/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -5
  147. package/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +2 -8
  148. package/lib/shared/bundler/webpack/pluginConfigs/configI18nIndexingPlugin.js +38 -0
  149. package/lib/shared/bundler/webpack/pluginConfigs/configI18nNumericHtmlInjector.js +86 -0
  150. package/lib/shared/bundler/webpack/pluginConfigs/configI18nNumericIndexPlugin.js +92 -0
  151. package/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +3 -9
  152. package/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -2
  153. package/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +0 -7
  154. package/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +3 -7
  155. package/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +1 -5
  156. package/lib/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +1 -4
  157. package/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -4
  158. package/lib/shared/bundler/webpack/pluginConfigs/configRuntimeResourceCleanup.js +3 -8
  159. package/lib/shared/bundler/webpack/pluginConfigs/configSelectorWeightPlugin.js +1 -6
  160. package/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +3 -8
  161. package/lib/shared/bundler/webpack/pluginConfigs/configSourceMapPlugin.js +0 -4
  162. package/lib/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +1 -8
  163. package/lib/shared/bundler/webpack/pluginConfigs/configVariableConversionPlugin.js +1 -6
  164. package/lib/shared/bundler/webpack/plugins.js +3 -24
  165. package/lib/shared/bundler/webpack/resolvers.js +3 -17
  166. package/lib/shared/bundler/webpack/splitChunksConfig.js +2 -15
  167. package/lib/shared/bundler/webpack/statsConfig.js +2 -5
  168. package/lib/shared/bundler/webpack/tsLoaders.js +2 -4
  169. package/lib/shared/bundler/webpack/utils/index.js +1 -12
  170. package/lib/shared/bundler/webpack/utils/object-manipulation.js +2 -16
  171. package/lib/shared/bundler/webpack/utils/updateArrayWithDefault.js +0 -7
  172. package/lib/shared/bundler/webpack/webpackBuild.js +1 -8
  173. package/lib/shared/bundler/webpack/webpackConfig.js +0 -17
  174. package/lib/shared/commands-utils/doBasicRequirementCheck.js +0 -3
  175. package/lib/shared/commands-utils/getCliPath.js +5 -9
  176. package/lib/shared/commands-utils/index.js +0 -3
  177. package/lib/shared/commands-utils/log.js +0 -2
  178. package/lib/shared/commands-utils/readArgsFormCommandLine.js +0 -1
  179. package/lib/shared/commands-utils/readOptionFormCommandLine.js +0 -1
  180. package/lib/shared/commands-utils/spawnSyncIO.js +5 -13
  181. package/lib/shared/constants.js +9 -29
  182. package/lib/shared/fileUtils/copyFile.js +1 -8
  183. package/lib/shared/fileUtils/directoryIterator.js +0 -4
  184. package/lib/shared/fileUtils/watchRun.js +3 -24
  185. package/lib/shared/postcss/custom_postcss_plugins/EmptyPlugin.js +1 -6
  186. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/constants.js +2 -3
  187. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js +6 -13
  188. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/index.js +6 -26
  189. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/insertBefore.js +6 -9
  190. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js +0 -3
  191. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js +2 -7
  192. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js +0 -2
  193. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/specialCases.js +4 -9
  194. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js +0 -10
  195. package/lib/shared/postcss/custom_postcss_plugins/RTLSplitPlugin.js +16 -29
  196. package/lib/shared/postcss/custom_postcss_plugins/SelectorReplace.js +0 -17
  197. package/lib/shared/postcss/custom_postcss_plugins/ValueReplacer.js +4 -9
  198. package/lib/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +28 -64
  199. package/lib/shared/postcss/filterPluginsAllowedForSpecficFile.js +5 -13
  200. package/lib/shared/postcss/getAllowedPostCssPlugins.js +0 -3
  201. package/lib/shared/postcss/getSpecificPostCssPlugin.js +7 -17
  202. package/lib/shared/postcss/runPostCssForCssFile.js +1 -9
  203. package/lib/shared/pre_process/runPreProcess.js +0 -11
  204. package/lib/shared/server/configWebpackDevMiddleware.js +1 -8
  205. package/lib/shared/server/corsHandling.js +2 -6
  206. package/lib/shared/server/getIp.js +1 -7
  207. package/lib/shared/server/getServerURL.js +0 -6
  208. package/lib/shared/server/httpsOptions.js +0 -11
  209. package/lib/shared/server/initExpressApp.js +1 -4
  210. package/lib/shared/server/initialHTMLHandling.js +7 -16
  211. package/lib/shared/server/mockApiHandler.js +8 -16
  212. package/lib/shared/server/mockServer.js +0 -7
  213. package/lib/shared/server/serveContextFiles.js +1 -5
  214. package/lib/shared/server/serverBywebpackDevMiddleware.js +4 -9
  215. package/lib/shared/server/startHttpServer.js +0 -3
  216. package/lib/shared/server/startHttpsServer.js +1 -9
  217. package/lib/shared/server/unwanted/addHttp2Server.js +2 -7
  218. package/lib/shared/server/unwanted/configWebpackDevMiddleware.js +1 -8
  219. package/lib/shared/server/unwanted/mockApiSupport.js +0 -2
  220. package/lib/shared/server/unwanted/websocketMockSetup.js +1 -7
  221. package/lib/shared/server/urlConcat.js +3 -8
  222. package/lib/shared/utils/requireLocalOrGlobal.js +10 -25
  223. package/lib/shared/utils/versionPrint.js +1 -6
  224. package/npm-shrinkwrap.json +2 -2
  225. package/package.json +1 -1
  226. package/packages/client_build_tool/test-i18n-config.js +22 -0
package/README.md CHANGED
@@ -113,210 +113,6 @@ fixes :-
113
113
 
114
114
 
115
115
 
116
- # v0.0.11
117
-
118
- # v0.0.10 (12-05-2025)
119
- **Feature:-**
120
- - `alias` support for `build:es` and `build:lib`
121
- - Add babel-plugin-module-resolver dependencies
122
- - Modify getBabelPlugin to include module resolver with aliases
123
-
124
- **Bug Fix:-**
125
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
126
- - Update mockApiHandler to ensure mock function is called correctly
127
-
128
- **Change:-**
129
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
130
-
131
- ## v0.0.9
132
-
133
- **Feature:-**
134
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
135
- - to use externals, we use the following pattern in `app > externals` :
136
-
137
- For example
138
- ```
139
- externals: {
140
- <key> : <value>
141
- }
142
- ```
143
-
144
- ## v0.0.6 (4-09-2023)
145
-
146
- **Feature:-**
147
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
148
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
149
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
150
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
151
- - added support for glob pattern for custom chunks split logic.
152
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
153
-
154
- **Change:-**
155
- - i18n name not generated issue fix.
156
- - public path not correctly set issue fix.
157
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
158
- ## v0.0.5 (6-08-2023)
159
-
160
- **Changes:--**
161
- - Typo fix in i18nRuntimeDealerPlugin.js
162
- - fixing some bugs in resolvers.js file
163
-
164
- ## v0.0.3 (1-08-2023)
165
-
166
- **Changes:--**
167
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
168
- - unwanted files deleted from build
169
-
170
- **Issue Fix:--**
171
- - The issue with the source map not being created in the build has been fixed."
172
-
173
-
174
- ## v0.0.2 (28-04-2023)
175
-
176
- **Features:-**
177
-
178
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
179
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
180
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
181
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
182
- - `enableChunkHash` renamed as `enableFileNameHashing`
183
-
184
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
185
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
186
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
187
- - `removePropTypes` support for remove the prop types package in the output build.
188
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
189
- - `manifestJson` default value set as false.
190
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
191
-
192
-
193
- ## v0.0.1 (18-04-2023)
194
-
195
- First Release
196
- **Features:-**
197
-
198
- - 'start' command to run react app
199
- - 'build' command to create build for react app
200
- - 'build:lib' command to create lib for react library
201
- - 'build:es' command to create es for react library
202
- - 'templates' command to create es for react library
203
- # Changelog and Release Notes
204
-
205
- - remove babel-plugin-module-resolver dependencies
206
-
207
- **Adjustments:-**
208
- - Public Folder configuration is separated for development and production
209
-
210
- **Bug Fix:-**
211
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
212
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
213
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
214
- - Fixed the URL path generation issue that occurred while using context in the development setup.
215
-
216
-
217
-
218
- # v0.0.11
219
-
220
- # v0.0.10 (12-05-2025)
221
- **Feature:-**
222
- - `alias` support for `build:es` and `build:lib`
223
- - Add babel-plugin-module-resolver dependencies
224
- - Modify getBabelPlugin to include module resolver with aliases
225
-
226
- **Bug Fix:-**
227
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
228
- - Update mockApiHandler to ensure mock function is called correctly
229
-
230
- **Change:-**
231
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
232
-
233
- ## v0.0.9
234
-
235
- **Feature:-**
236
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
237
- - to use externals, we use the following pattern in `app > externals` :
238
-
239
- For example
240
- ```
241
- externals: {
242
- <key> : <value>
243
- }
244
- ```
245
-
246
- ## v0.0.6 (4-09-2023)
247
-
248
- **Feature:-**
249
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
250
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
251
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
252
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
253
- - added support for glob pattern for custom chunks split logic.
254
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
255
-
256
- **Change:-**
257
- - i18n name not generated issue fix.
258
- - public path not correctly set issue fix.
259
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
260
- ## v0.0.5 (6-08-2023)
261
-
262
- **Changes:--**
263
- - Typo fix in i18nRuntimeDealerPlugin.js
264
- - fixing some bugs in resolvers.js file
265
-
266
- ## v0.0.3 (1-08-2023)
267
-
268
- **Changes:--**
269
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
270
- - unwanted files deleted from build
271
-
272
- **Issue Fix:--**
273
- - The issue with the source map not being created in the build has been fixed."
274
-
275
-
276
- ## v0.0.2 (28-04-2023)
277
-
278
- **Features:-**
279
-
280
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
281
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
282
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
283
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
284
- - `enableChunkHash` renamed as `enableFileNameHashing`
285
-
286
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
287
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
288
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
289
- - `removePropTypes` support for remove the prop types package in the output build.
290
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
291
- - `manifestJson` default value set as false.
292
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
293
-
294
-
295
- ## v0.0.1 (18-04-2023)
296
-
297
- First Release
298
- **Features:-**
299
-
300
- - 'start' command to run react app
301
- - 'build' command to create build for react app
302
- - 'build:lib' command to create lib for react library
303
- - 'build:es' command to create es for react library
304
- - 'templates' command to create es for react library
305
- # Changelog and Release Notes
306
-
307
- - remove babel-plugin-module-resolver dependencies
308
-
309
- **Adjustments:-**
310
- - Public Folder configuration is separated for development and production
311
-
312
- **Bug Fix:-**
313
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
314
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
315
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
316
- - Fixed the URL path generation issue that occurred while using context in the development setup.
317
-
318
-
319
-
320
116
  # v0.0.11
321
117
 
322
118
  # v0.0.10 (12-05-2025)
package/README_backup.md CHANGED
@@ -98,207 +98,3 @@ fixes :-
98
98
 
99
99
  - preload plc undefined url fixed
100
100
 
101
- # Changelog and Release Notes
102
-
103
- - remove babel-plugin-module-resolver dependencies
104
-
105
- **Adjustments:-**
106
- - Public Folder configuration is separated for development and production
107
-
108
- **Bug Fix:-**
109
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
110
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
111
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
112
- - Fixed the URL path generation issue that occurred while using context in the development setup.
113
-
114
-
115
-
116
- # v0.0.11
117
-
118
- # v0.0.10 (12-05-2025)
119
- **Feature:-**
120
- - `alias` support for `build:es` and `build:lib`
121
- - Add babel-plugin-module-resolver dependencies
122
- - Modify getBabelPlugin to include module resolver with aliases
123
-
124
- **Bug Fix:-**
125
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
126
- - Update mockApiHandler to ensure mock function is called correctly
127
-
128
- **Change:-**
129
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
130
-
131
- ## v0.0.9
132
-
133
- **Feature:-**
134
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
135
- - to use externals, we use the following pattern in `app > externals` :
136
-
137
- For example
138
- ```
139
- externals: {
140
- <key> : <value>
141
- }
142
- ```
143
-
144
- ## v0.0.6 (4-09-2023)
145
-
146
- **Feature:-**
147
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
148
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
149
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
150
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
151
- - added support for glob pattern for custom chunks split logic.
152
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
153
-
154
- **Change:-**
155
- - i18n name not generated issue fix.
156
- - public path not correctly set issue fix.
157
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
158
- ## v0.0.5 (6-08-2023)
159
-
160
- **Changes:--**
161
- - Typo fix in i18nRuntimeDealerPlugin.js
162
- - fixing some bugs in resolvers.js file
163
-
164
- ## v0.0.3 (1-08-2023)
165
-
166
- **Changes:--**
167
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
168
- - unwanted files deleted from build
169
-
170
- **Issue Fix:--**
171
- - The issue with the source map not being created in the build has been fixed."
172
-
173
-
174
- ## v0.0.2 (28-04-2023)
175
-
176
- **Features:-**
177
-
178
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
179
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
180
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
181
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
182
- - `enableChunkHash` renamed as `enableFileNameHashing`
183
-
184
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
185
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
186
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
187
- - `removePropTypes` support for remove the prop types package in the output build.
188
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
189
- - `manifestJson` default value set as false.
190
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
191
-
192
-
193
- ## v0.0.1 (18-04-2023)
194
-
195
- First Release
196
- **Features:-**
197
-
198
- - 'start' command to run react app
199
- - 'build' command to create build for react app
200
- - 'build:lib' command to create lib for react library
201
- - 'build:es' command to create es for react library
202
- - 'templates' command to create es for react library
203
- # Changelog and Release Notes
204
-
205
- - remove babel-plugin-module-resolver dependencies
206
-
207
- **Adjustments:-**
208
- - Public Folder configuration is separated for development and production
209
-
210
- **Bug Fix:-**
211
- - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
212
- - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
213
- - Fixed the issue where a space in the variable name causes it to return an undefined value.
214
- - Fixed the URL path generation issue that occurred while using context in the development setup.
215
-
216
-
217
-
218
- # v0.0.11
219
-
220
- # v0.0.10 (12-05-2025)
221
- **Feature:-**
222
- - `alias` support for `build:es` and `build:lib`
223
- - Add babel-plugin-module-resolver dependencies
224
- - Modify getBabelPlugin to include module resolver with aliases
225
-
226
- **Bug Fix:-**
227
- - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
228
- - Update mockApiHandler to ensure mock function is called correctly
229
-
230
- **Change:-**
231
- - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
232
-
233
- ## v0.0.9
234
-
235
- **Feature:-**
236
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
237
- - to use externals, we use the following pattern in `app > externals` :
238
-
239
- For example
240
- ```
241
- externals: {
242
- <key> : <value>
243
- }
244
- ```
245
-
246
- ## v0.0.6 (4-09-2023)
247
-
248
- **Feature:-**
249
- - Generating bundle integrity report json file for the build assets only in production mode. To use this feature we need to add `stats > enable` or cli flags `enable_stats`.
250
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
251
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
252
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
253
- - added support for glob pattern for custom chunks split logic.
254
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
255
-
256
- **Change:-**
257
- - i18n name not generated issue fix.
258
- - public path not correctly set issue fix.
259
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
260
- ## v0.0.5 (6-08-2023)
261
-
262
- **Changes:--**
263
- - Typo fix in i18nRuntimeDealerPlugin.js
264
- - fixing some bugs in resolvers.js file
265
-
266
- ## v0.0.3 (1-08-2023)
267
-
268
- **Changes:--**
269
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
270
- - unwanted files deleted from build
271
-
272
- **Issue Fix:--**
273
- - The issue with the source map not being created in the build has been fixed."
274
-
275
-
276
- ## v0.0.2 (28-04-2023)
277
-
278
- **Features:-**
279
-
280
- - `devModeContentHashAllowedTypes` support added for some project there will be a need for hash even though they run dev mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devModeContentHashAllowedTypes)
281
- - `devLikeHash` support for disable content hash for file names in production mode. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#devLikeHash)
282
- - `disableReactDevWarning` disable react dev warning such as prop-type warnings will be removed in dev mode build or server. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#disableReactDevWarning) can be enabled via `--disable_react_dev_warning` too.
283
- - `statsLogConfig` support to customize default webpack log after build finished. for details [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/3.0.0/packages/client_build_tool/ConfigurationDocumentation.md#statsLogConfig) can be enabled via `--disable_react_dev_warning` too.
284
- - `enableChunkHash` renamed as `enableFileNameHashing`
285
-
286
- - `pre_processor` command to run the preprocessor.js file.preProcessor runs in build, start, buildEs, buildLib commands bu default. and we have watch mode support as well with the option (`-w`)
287
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
288
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
289
- - `removePropTypes` support for remove the prop types package in the output build.
290
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
291
- - `manifestJson` default value set as false.
292
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
293
-
294
-
295
- ## v0.0.1 (18-04-2023)
296
-
297
- First Release
298
- **Features:-**
299
-
300
- - 'start' command to run react app
301
- - 'build' command to create build for react app
302
- - 'build:lib' command to create lib for react library
303
- - 'build:es' command to create es for react library
304
- - 'templates' command to create es for react library
@@ -0,0 +1,129 @@
1
+ # Dynamic singleFileTemplate Configuration
2
+
3
+ ## Overview
4
+ The `singleFileTemplate` option now supports both static strings and dynamic functions, allowing different filename patterns based on build mode.
5
+
6
+ ## Configuration Options
7
+
8
+ ### 1. Static Template (Simple)
9
+ ```javascript
10
+ i18nIndexing: {
11
+ singleFileTemplate: '[locale].js' // Always uses this format
12
+ }
13
+ ```
14
+
15
+ ### 2. Dynamic Template with Function
16
+ ```javascript
17
+ i18nIndexing: {
18
+ isDevelopment: isDevelopment, // Pass from your app
19
+ singleFileTemplate: (isDev) =>
20
+ isDev ? '[locale].js' : '[locale].[contenthash].js'
21
+ }
22
+ ```
23
+
24
+ ### 3. Inline Conditional (Pre-resolved)
25
+ ```javascript
26
+ i18nIndexing: {
27
+ isDevelopment: isDevelopment, // Pass from your app
28
+ singleFileTemplate: isDevelopment
29
+ ? '[locale].js'
30
+ : '[locale].[contenthash].js'
31
+ }
32
+ ```
33
+
34
+ ## Template Placeholders
35
+
36
+ - `[locale]` - Replaced with actual locale code (e.g., en_US, fr_FR)
37
+ - `[contenthash]` - Replaced with content-based hash for cache busting
38
+
39
+ ## Output Examples
40
+
41
+ ### Development Mode (isDevelopment = true)
42
+ ```
43
+ Template: '[locale].js'
44
+ Output:
45
+ i18n/en_US.js
46
+ i18n/fr_FR.js
47
+ i18n/de_DE.js
48
+ ```
49
+
50
+ ### Production Mode (isDevelopment = false)
51
+ ```
52
+ Template: '[locale].[contenthash].js'
53
+ Output:
54
+ i18n/en_US.b9ef890a.js
55
+ i18n/fr_FR.3452451e.js
56
+ i18n/de_DE.e8b84364.js
57
+ ```
58
+
59
+ ## Complete Example Configuration
60
+
61
+ ```javascript
62
+ exports.config = {
63
+ context: 'src',
64
+ output: 'build',
65
+ mode: process.env.NODE_ENV || 'production',
66
+
67
+ // Pass isDevelopment from your app
68
+ isDevelopment: process.env.NODE_ENV === 'development',
69
+
70
+ i18nIndexing: {
71
+ enable: true,
72
+ outputFolder: 'i18n',
73
+ jsResourcePath: './resources/ApplicationResources.properties',
74
+ propertiesFolderPath: './resources',
75
+ numericMapPath: './numericMap.json',
76
+
77
+ // Dynamic template based on build mode
78
+ singleFileTemplate: function(isDevelopment) {
79
+ return isDevelopment ? '[locale].js' : '[locale].[contenthash].js';
80
+ },
81
+
82
+ // Or using arrow function
83
+ // singleFileTemplate: (isDev) => isDev ? '[locale].js' : '[locale].[contenthash].js',
84
+
85
+ // Or pre-resolved
86
+ // singleFileTemplate: isDevelopment ? '[locale].js' : '[locale].[contenthash].js',
87
+
88
+ singleFile: true,
89
+ jsonpFunc: 'var imAppI18n=',
90
+ htmlTemplateLabel: '{{--user-locale}}',
91
+ localeVarName: 'window.userLangCode',
92
+ generateManifest: true,
93
+ manifestPath: 'i18n/manifest.json'
94
+
95
+ // Note: includeContentHash is now optional when using [contenthash] in template
96
+ // includeContentHash: true // Not needed with [contenthash] placeholder
97
+ }
98
+ };
99
+ ```
100
+
101
+ ## Benefits
102
+
103
+ 1. **Development**: Clean, readable filenames without hashes for easier debugging
104
+ 2. **Production**: Content-hashed filenames for optimal caching
105
+ 3. **Flexibility**: Single configuration handles both environments
106
+ 4. **No Redundancy**: Using `[contenthash]` in template eliminates need for `includeContentHash` option
107
+
108
+ ## Migration from includeContentHash
109
+
110
+ ### Old Way
111
+ ```javascript
112
+ singleFileTemplate: '[locale].js',
113
+ includeContentHash: true // Adds hash before .js
114
+ // Output: en_US.abc123.js
115
+ ```
116
+
117
+ ### New Way (Recommended)
118
+ ```javascript
119
+ singleFileTemplate: isDevelopment ? '[locale].js' : '[locale].[contenthash].js'
120
+ // Output: en_US.abc123.js (production) or en_US.js (development)
121
+ ```
122
+
123
+ ## Notes
124
+
125
+ - The function receives `isDevelopment` as a boolean parameter
126
+ - You must pass `isDevelopment` in your main options object
127
+ - The `[contenthash]` placeholder is automatically replaced with the actual hash
128
+ - For HTML injection, the hash placeholder is removed since the exact hash isn't known at HTML generation time
129
+ - The manifest will map clean names to hashed versions for deployment scripts