@zohodesk/client_build_tool 0.0.6-exp.5 → 0.0.6-exp.7

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/README.md CHANGED
@@ -86,228 +86,6 @@ For more [Details](ConfigurationDocumentation.md)
86
86
 
87
87
 
88
88
 
89
- **Feature:-**
90
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
91
- - to use externals, we use the following pattern in `app > externals` :
92
-
93
- For example
94
- ```
95
- externals: {
96
- <key> : <value>
97
- }
98
- ```
99
-
100
- ## v0.0.6 (4-09-2023)
101
-
102
- **Feature:-**
103
- - 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`.
104
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
105
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
106
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
107
- - added support for glob pattern for custom chunks split logic.
108
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
109
-
110
- **Change:-**
111
- - i18n name not generated issue fix.
112
- - public path not correctly set issue fix.
113
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
114
- ## v0.0.5 (6-08-2023)
115
-
116
- **Changes:--**
117
- - Typo fix in i18nRuntimeDealerPlugin.js
118
- - fixing some bugs in resolvers.js file
119
-
120
- ## v0.0.3 (1-08-2023)
121
-
122
- **Changes:--**
123
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
124
- - unwanted files deleted from build
125
-
126
- **Issue Fix:--**
127
- - The issue with the source map not being created in the build has been fixed."
128
-
129
-
130
- ## v0.0.2 (28-04-2023)
131
-
132
- **Features:-**
133
-
134
- - `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)
135
- - `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)
136
- - `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.
137
- - `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.
138
- - `enableChunkHash` renamed as `enableFileNameHashing`
139
-
140
- - `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`)
141
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
142
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
143
- - `removePropTypes` support for remove the prop types package in the output build.
144
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
145
- - `manifestJson` default value set as false.
146
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
147
-
148
-
149
- ## v0.0.1 (18-04-2023)
150
-
151
- First Release
152
- **Features:-**
153
-
154
- - 'start' command to run react app
155
- - 'build' command to create build for react app
156
- - 'build:lib' command to create lib for react library
157
- - 'build:es' command to create es for react library
158
- - 'templates' command to create es for react library
159
- # Changelog and Release Notes
160
-
161
-
162
-
163
- **Feature:-**
164
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
165
- - to use externals, we use the following pattern in `app > externals` :
166
-
167
- For example
168
- ```
169
- externals: {
170
- <key> : <value>
171
- }
172
- ```
173
-
174
- ## v0.0.6 (4-09-2023)
175
-
176
- **Feature:-**
177
- - 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`.
178
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
179
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
180
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
181
- - added support for glob pattern for custom chunks split logic.
182
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
183
-
184
- **Change:-**
185
- - i18n name not generated issue fix.
186
- - public path not correctly set issue fix.
187
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
188
- ## v0.0.5 (6-08-2023)
189
-
190
- **Changes:--**
191
- - Typo fix in i18nRuntimeDealerPlugin.js
192
- - fixing some bugs in resolvers.js file
193
-
194
- ## v0.0.3 (1-08-2023)
195
-
196
- **Changes:--**
197
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
198
- - unwanted files deleted from build
199
-
200
- **Issue Fix:--**
201
- - The issue with the source map not being created in the build has been fixed."
202
-
203
-
204
- ## v0.0.2 (28-04-2023)
205
-
206
- **Features:-**
207
-
208
- - `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)
209
- - `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)
210
- - `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.
211
- - `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.
212
- - `enableChunkHash` renamed as `enableFileNameHashing`
213
-
214
- - `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`)
215
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
216
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
217
- - `removePropTypes` support for remove the prop types package in the output build.
218
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
219
- - `manifestJson` default value set as false.
220
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
221
-
222
-
223
- ## v0.0.1 (18-04-2023)
224
-
225
- First Release
226
- **Features:-**
227
-
228
- - 'start' command to run react app
229
- - 'build' command to create build for react app
230
- - 'build:lib' command to create lib for react library
231
- - 'build:es' command to create es for react library
232
- - 'templates' command to create es for react library
233
- # Changelog and Release Notes
234
-
235
-
236
-
237
- **Feature:-**
238
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
239
- - to use externals, we use the following pattern in `app > externals` :
240
-
241
- For example
242
- ```
243
- externals: {
244
- <key> : <value>
245
- }
246
- ```
247
-
248
- ## v0.0.6 (4-09-2023)
249
-
250
- **Feature:-**
251
- - 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`.
252
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
253
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
254
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
255
- - added support for glob pattern for custom chunks split logic.
256
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
257
-
258
- **Change:-**
259
- - i18n name not generated issue fix.
260
- - public path not correctly set issue fix.
261
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
262
- ## v0.0.5 (6-08-2023)
263
-
264
- **Changes:--**
265
- - Typo fix in i18nRuntimeDealerPlugin.js
266
- - fixing some bugs in resolvers.js file
267
-
268
- ## v0.0.3 (1-08-2023)
269
-
270
- **Changes:--**
271
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
272
- - unwanted files deleted from build
273
-
274
- **Issue Fix:--**
275
- - The issue with the source map not being created in the build has been fixed."
276
-
277
-
278
- ## v0.0.2 (28-04-2023)
279
-
280
- **Features:-**
281
-
282
- - `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)
283
- - `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)
284
- - `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.
285
- - `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.
286
- - `enableChunkHash` renamed as `enableFileNameHashing`
287
-
288
- - `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`)
289
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
290
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
291
- - `removePropTypes` support for remove the prop types package in the output build.
292
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
293
- - `manifestJson` default value set as false.
294
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
295
-
296
-
297
- ## v0.0.1 (18-04-2023)
298
-
299
- First Release
300
- **Features:-**
301
-
302
- - 'start' command to run react app
303
- - 'build' command to create build for react app
304
- - 'build:lib' command to create lib for react library
305
- - 'build:es' command to create es for react library
306
- - 'templates' command to create es for react library
307
- # Changelog and Release Notes
308
-
309
-
310
-
311
89
  **Feature:-**
312
90
  - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
313
91
  - to use externals, we use the following pattern in `app > externals` :
package/README_backup.md CHANGED
@@ -82,225 +82,3 @@ The following commands are available options for the `cbt` (Client Build Tool) C
82
82
  These commands provide flexibility and control over your client-side build process, allowing you to start the development server, build your application, transpile libraries, create templates, run a mock API server, and more.
83
83
 
84
84
  For more [Details](ConfigurationDocumentation.md)
85
- # Changelog and Release Notes
86
-
87
-
88
-
89
- **Feature:-**
90
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
91
- - to use externals, we use the following pattern in `app > externals` :
92
-
93
- For example
94
- ```
95
- externals: {
96
- <key> : <value>
97
- }
98
- ```
99
-
100
- ## v0.0.6 (4-09-2023)
101
-
102
- **Feature:-**
103
- - 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`.
104
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
105
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
106
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
107
- - added support for glob pattern for custom chunks split logic.
108
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
109
-
110
- **Change:-**
111
- - i18n name not generated issue fix.
112
- - public path not correctly set issue fix.
113
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
114
- ## v0.0.5 (6-08-2023)
115
-
116
- **Changes:--**
117
- - Typo fix in i18nRuntimeDealerPlugin.js
118
- - fixing some bugs in resolvers.js file
119
-
120
- ## v0.0.3 (1-08-2023)
121
-
122
- **Changes:--**
123
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
124
- - unwanted files deleted from build
125
-
126
- **Issue Fix:--**
127
- - The issue with the source map not being created in the build has been fixed."
128
-
129
-
130
- ## v0.0.2 (28-04-2023)
131
-
132
- **Features:-**
133
-
134
- - `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)
135
- - `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)
136
- - `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.
137
- - `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.
138
- - `enableChunkHash` renamed as `enableFileNameHashing`
139
-
140
- - `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`)
141
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
142
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
143
- - `removePropTypes` support for remove the prop types package in the output build.
144
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
145
- - `manifestJson` default value set as false.
146
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
147
-
148
-
149
- ## v0.0.1 (18-04-2023)
150
-
151
- First Release
152
- **Features:-**
153
-
154
- - 'start' command to run react app
155
- - 'build' command to create build for react app
156
- - 'build:lib' command to create lib for react library
157
- - 'build:es' command to create es for react library
158
- - 'templates' command to create es for react library
159
- # Changelog and Release Notes
160
-
161
-
162
-
163
- **Feature:-**
164
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
165
- - to use externals, we use the following pattern in `app > externals` :
166
-
167
- For example
168
- ```
169
- externals: {
170
- <key> : <value>
171
- }
172
- ```
173
-
174
- ## v0.0.6 (4-09-2023)
175
-
176
- **Feature:-**
177
- - 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`.
178
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
179
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
180
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
181
- - added support for glob pattern for custom chunks split logic.
182
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
183
-
184
- **Change:-**
185
- - i18n name not generated issue fix.
186
- - public path not correctly set issue fix.
187
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
188
- ## v0.0.5 (6-08-2023)
189
-
190
- **Changes:--**
191
- - Typo fix in i18nRuntimeDealerPlugin.js
192
- - fixing some bugs in resolvers.js file
193
-
194
- ## v0.0.3 (1-08-2023)
195
-
196
- **Changes:--**
197
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
198
- - unwanted files deleted from build
199
-
200
- **Issue Fix:--**
201
- - The issue with the source map not being created in the build has been fixed."
202
-
203
-
204
- ## v0.0.2 (28-04-2023)
205
-
206
- **Features:-**
207
-
208
- - `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)
209
- - `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)
210
- - `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.
211
- - `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.
212
- - `enableChunkHash` renamed as `enableFileNameHashing`
213
-
214
- - `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`)
215
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
216
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
217
- - `removePropTypes` support for remove the prop types package in the output build.
218
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
219
- - `manifestJson` default value set as false.
220
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
221
-
222
-
223
- ## v0.0.1 (18-04-2023)
224
-
225
- First Release
226
- **Features:-**
227
-
228
- - 'start' command to run react app
229
- - 'build' command to create build for react app
230
- - 'build:lib' command to create lib for react library
231
- - 'build:es' command to create es for react library
232
- - 'templates' command to create es for react library
233
- # Changelog and Release Notes
234
-
235
-
236
-
237
- **Feature:-**
238
- - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
239
- - to use externals, we use the following pattern in `app > externals` :
240
-
241
- For example
242
- ```
243
- externals: {
244
- <key> : <value>
245
- }
246
- ```
247
-
248
- ## v0.0.6 (4-09-2023)
249
-
250
- **Feature:-**
251
- - 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`.
252
- - Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
253
- - added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
254
- only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
255
- - added support for glob pattern for custom chunks split logic.
256
- - added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
257
-
258
- **Change:-**
259
- - i18n name not generated issue fix.
260
- - public path not correctly set issue fix.
261
- - changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
262
- ## v0.0.5 (6-08-2023)
263
-
264
- **Changes:--**
265
- - Typo fix in i18nRuntimeDealerPlugin.js
266
- - fixing some bugs in resolvers.js file
267
-
268
- ## v0.0.3 (1-08-2023)
269
-
270
- **Changes:--**
271
- - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
272
- - unwanted files deleted from build
273
-
274
- **Issue Fix:--**
275
- - The issue with the source map not being created in the build has been fixed."
276
-
277
-
278
- ## v0.0.2 (28-04-2023)
279
-
280
- **Features:-**
281
-
282
- - `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)
283
- - `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)
284
- - `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.
285
- - `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.
286
- - `enableChunkHash` renamed as `enableFileNameHashing`
287
-
288
- - `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`)
289
- - `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
290
- - `removeAttribute` option changes as `babelCustomizations.removeAttribute`
291
- - `removePropTypes` support for remove the prop types package in the output build.
292
- - `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
293
- - `manifestJson` default value set as false.
294
- - `customAttributes` support for add attributes to html, link , script tag in the output build.
295
-
296
-
297
- ## v0.0.1 (18-04-2023)
298
-
299
- First Release
300
- **Features:-**
301
-
302
- - 'start' command to run react app
303
- - 'build' command to create build for react app
304
- - 'build:lib' command to create lib for react library
305
- - 'build:es' command to create es for react library
306
- - 'templates' command to create es for react library
@@ -7,48 +7,369 @@ exports.Dummy = void 0;
7
7
 
8
8
  var _webpack = require("webpack");
9
9
 
10
+ const first = set => {
11
+ const entry = set.values().next();
12
+ return entry.done ? undefined : entry.value;
13
+ };
14
+
10
15
  class Dummy {
11
16
  constructor() {
12
17
  this.variableName = '__CSS_CDN__';
13
18
  } // eslint-disable-next-line class-methods-use-this
19
+ // apply(compiler) {
20
+ // // Access processAssets hook from v5 API
21
+ // const { RawSource } = compiler.webpack.sources;
22
+ // compiler.hooks.compilation.tap('MyCutomPlugin', compilation => {
23
+ // compilation.hooks.processAssets.tap(
24
+ // {
25
+ // name: 'MyCustomPlugin',
26
+ // stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS // Choose an appropriate stage based on your needs
27
+ // },
28
+ // assets => {
29
+ // console.log('working');
30
+ // // Here you can interact with assets
31
+ // const asset = 'js/runtime~main'; // Replace with your actual chunk file name pattern
32
+ // Object.keys(assets).forEach(assetName => {
33
+ // // if (assetName.includes('main')) console.log(assetName);
34
+ // // });
35
+ // if (assetName.includes(asset)) {
36
+ // console.log('found');
37
+ // const originalSource = assets[assetName].source();
38
+ // // console.log(originalSource);
39
+ // const modifiedSource = originalSource.replace(
40
+ // '__webpack_require__.p + __webpack_require__.u(chunkId);',
41
+ // `window['${this.variableName}'] + __webpack_require__.u(chunkId);`
42
+ // );
43
+ // console.log(assetName);
44
+ // // console.log(modifiedSource);
45
+ // // console.log(a);
46
+ // // Apply your modifications here
47
+ // // const modifiedSource = someModificationFunction(originalSource);
48
+ // // Update the asset's source
49
+ // // eslint-disable-next-line no-param-reassign
50
+ // compilation.updateAsset(assetName, new RawSource(modifiedSource));
51
+ // }
52
+ // });
53
+ // }
54
+ // );
55
+ // });
56
+ // }
57
+ // }
58
+ // apply(compiler) {
59
+ // compiler.hooks.compilation.tap('MyPlugin', compilation => {
60
+ // console.log(compilation.moduleTemplates);
61
+ // Object.keys(compilation).forEach(hi => {
62
+ // console.log(hi);
63
+ // })
64
+ // const a = compilation.mainTemplate.hooks.localVars;
65
+ // a.tap('nj',(source, chunk, hash) => {
66
+ // console.log(source, 'pol');
67
+ // })
68
+ // console.log(compilation.moduleTemplates.javascript.hooks.localVars);
69
+ // const { moduleTemplates } = compilation;
70
+ // if (
71
+ // moduleTemplates &&
72
+ // moduleTemplates.javascript &&
73
+ // moduleTemplates.javascript.hooks
74
+ // ) {
75
+ // moduleTemplates.javascript.hooks.localVars.tap(
76
+ // 'MyPlugin',
77
+ // (source, chunk, hash) => {
78
+ // // Your logic for modifying localVars
79
+ // return source;
80
+ // }
81
+ // );
82
+ // } else {
83
+ // console.error(
84
+ // 'Hooks or module template not available for this compilation.'
85
+ // );
86
+ // }
87
+ // });
88
+ // }
89
+ // }
90
+ // apply(compiler) {
91
+ // // Access the compilation hook
92
+ // compiler.hooks.compilation.tap('MyCustomRuntimePlugin', compilation => {
93
+ // console.log(webpack.javascript.JavascriptModulesPlugin.getCompilationHooks)
94
+ // // Hook into the webpack runtime module template
95
+ // webpack.javascript.JavascriptModulesPlugin.getCompilationHooks(
96
+ // compilation
97
+ // ).renderRequire.tap('MyCustomRuntimePlugin', (source, renderContext) => {console.log(source)
98
+ // // A naive example to demonstrate the replacement of __webpack_require__.u function.
99
+ // // const newSource = source.replace('__webpack_require__.u', function () {
100
+ // // // Your modified code or logic here
101
+ // // return '/* custom logic */';
102
+ // });
103
+ // // return newSource;
104
+ // });
105
+ // };
106
+ // }
107
+ // MyCustomRuntimePlugin.js
108
+ // }
109
+ // apply(compiler) {
110
+ // compiler.hooks.compilation.tap('MyWebpackPlugin', (compilation) => {
111
+ // console.log(compilation.hooks.runtimeModule.compile.toString());
112
+ // // Example: tapping into the 'optimize' hook
113
+ // compilation.hooks.optimize.tap('MyWebpackPlugin', () => {
114
+ // console.log('Assets are being optimized.');
115
+ // });
116
+ // });
117
+ // }
14
118
 
15
119
 
16
120
  apply(compiler) {
17
- // Access processAssets hook from v5 API
18
- const {
19
- RawSource
20
- } = compiler.webpack.sources;
21
- compiler.hooks.compilation.tap('MyCutomPlugin', compilation => {
22
- compilation.hooks.processAssets.tap({
23
- name: 'MyCustomPlugin',
24
- stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS // Choose an appropriate stage based on your needs
25
-
26
- }, assets => {
27
- console.log('working'); // Here you can interact with assets
28
-
29
- const assetName = 'js/runtime~main.js'; // Replace with your actual chunk file name pattern
30
-
31
- Object.keys(assets).forEach(assetName => {
32
- if (assetName.includes('main')) console.log(assetName);
33
- });
34
-
35
- if (assets[assetName]) {
36
- console.log('found');
37
- const originalSource = assets[assetName].source();
38
- const modifiedSource = originalSource.replace('__webpack_require__.p + __webpack_require__.u(chunkId);', `window['${this.variableName}'] + __webpack_require__.u(chunkId);`); // console.log(a);
39
- // Apply your modifications here
40
- // const modifiedSource = someModificationFunction(originalSource);
41
- // Update the asset's source
42
- // eslint-disable-next-line no-param-reassign
43
-
44
- compilation.updateAsset(assetName, new RawSource(modifiedSource));
45
- } else {
46
- console.log('not');
47
- }
121
+ compiler.hooks.compilation.tap("k", compilation => {
122
+ compilation.hooks.runtimeRequirementInTree.for(_webpack.RuntimeGlobals.getChunkScriptFilename).tap("RuntimePlugin", (chunk, set) => {
123
+ console.log('NUmber2');
124
+ compilation.addRuntimeModule(chunk, new hello("javascript", "javascript", _webpack.RuntimeGlobals.getChunkScriptFilename, chunk => chunk.filenameTemplate || (chunk.canBeInitial() ? compilation.outputOptions.filename : compilation.outputOptions.chunkFilename), false));
125
+ return true;
48
126
  });
49
127
  });
50
128
  }
51
129
 
52
130
  }
53
131
 
54
- exports.Dummy = Dummy;
132
+ exports.Dummy = Dummy;
133
+
134
+ class hello extends _webpack.RuntimeModule {
135
+ constructor(contentType, name, global, getFilenameForChunk, allChunks) {
136
+ super(`get ${name} chunk filename`);
137
+ this.contentType = contentType;
138
+ this.global = global;
139
+ this.getFilenameForChunk = getFilenameForChunk;
140
+ this.allChunks = allChunks;
141
+ this.dependentHash = true;
142
+ }
143
+
144
+ generate() {
145
+ const {
146
+ global,
147
+ chunk,
148
+ chunkGraph,
149
+ contentType,
150
+ getFilenameForChunk,
151
+ allChunks,
152
+ compilation
153
+ } = this;
154
+ const {
155
+ runtimeTemplate
156
+ } = compilation;
157
+ /** @type {Map<string | FilenameFunction, Set<Chunk>>} */
158
+
159
+ const chunkFilenames = new Map();
160
+ let maxChunks = 0;
161
+ /** @type {string} */
162
+
163
+ let dynamicFilename;
164
+ /**
165
+ * @param {Chunk} c the chunk
166
+ * @returns {void}
167
+ */
168
+
169
+ const addChunk = c => {
170
+ const chunkFilename = getFilenameForChunk(c);
171
+
172
+ if (chunkFilename) {
173
+ let set = chunkFilenames.get(chunkFilename);
174
+
175
+ if (set === undefined) {
176
+ chunkFilenames.set(chunkFilename, set = new Set());
177
+ }
178
+
179
+ set.add(c);
180
+
181
+ if (typeof chunkFilename === 'string') {
182
+ if (set.size < maxChunks) return;
183
+
184
+ if (set.size === maxChunks) {
185
+ if (chunkFilename.length < dynamicFilename.length) return;
186
+
187
+ if (chunkFilename.length === dynamicFilename.length) {
188
+ if (chunkFilename < dynamicFilename) return;
189
+ }
190
+ }
191
+
192
+ maxChunks = set.size;
193
+ dynamicFilename = chunkFilename;
194
+ }
195
+ }
196
+ };
197
+ /** @type {string[]} */
198
+
199
+
200
+ const includedChunksMessages = [];
201
+
202
+ if (allChunks) {
203
+ includedChunksMessages.push('all chunks');
204
+
205
+ for (const c of chunk.getAllReferencedChunks()) {
206
+ addChunk(c);
207
+ }
208
+ } else {
209
+ includedChunksMessages.push('async chunks');
210
+
211
+ for (const c of chunk.getAllAsyncChunks()) {
212
+ addChunk(c);
213
+ }
214
+
215
+ const includeEntries = chunkGraph.getTreeRuntimeRequirements(chunk).has(_webpack.RuntimeGlobals.ensureChunkIncludeEntries);
216
+
217
+ if (includeEntries) {
218
+ includedChunksMessages.push('sibling chunks for the entrypoint');
219
+
220
+ for (const c of chunkGraph.getChunkEntryDependentChunksIterable(chunk)) {
221
+ addChunk(c);
222
+ }
223
+ }
224
+ }
225
+
226
+ for (const entrypoint of chunk.getAllReferencedAsyncEntrypoints()) {
227
+ addChunk(entrypoint.chunks[entrypoint.chunks.length - 1]);
228
+ }
229
+ /** @type {Map<string, Set<string | number>>} */
230
+
231
+
232
+ const staticUrls = new Map();
233
+ /** @type {Set<Chunk>} */
234
+
235
+ const dynamicUrlChunks = new Set();
236
+ /**
237
+ * @param {Chunk} c the chunk
238
+ * @param {string | FilenameFunction} chunkFilename the filename template for the chunk
239
+ * @returns {void}
240
+ */
241
+
242
+ const addStaticUrl = (c, chunkFilename) => {
243
+ /**
244
+ * @param {string | number} value a value
245
+ * @returns {string} string to put in quotes
246
+ */
247
+ const unquotedStringify = value => {
248
+ const str = `${value}`;
249
+
250
+ if (str.length >= 5 && str === `${c.id}`) {
251
+ // This is shorter and generates the same result
252
+ return '" + chunkId + "';
253
+ }
254
+
255
+ const s = JSON.stringify(str);
256
+ return s.slice(1, s.length - 1);
257
+ };
258
+
259
+ const unquotedStringifyWithLength = value => length => unquotedStringify(`${value}`.slice(0, length));
260
+
261
+ const chunkFilenameValue = typeof chunkFilename === 'function' ? JSON.stringify(chunkFilename({
262
+ chunk: c,
263
+ contentHashType: contentType
264
+ })) : JSON.stringify(chunkFilename);
265
+ const staticChunkFilename = compilation.getPath(chunkFilenameValue, {
266
+ hash: `" + ${_webpack.RuntimeGlobals.getFullHash}() + "`,
267
+ hashWithLength: length => `" + ${_webpack.RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`,
268
+ chunk: {
269
+ id: unquotedStringify(c.id),
270
+ hash: unquotedStringify(c.renderedHash),
271
+ hashWithLength: unquotedStringifyWithLength(c.renderedHash),
272
+ name: unquotedStringify(c.name || c.id),
273
+ contentHash: {
274
+ [contentType]: unquotedStringify(c.contentHash[contentType])
275
+ },
276
+ contentHashWithLength: {
277
+ [contentType]: unquotedStringifyWithLength(c.contentHash[contentType])
278
+ }
279
+ },
280
+ contentHashType: contentType
281
+ });
282
+ let set = staticUrls.get(staticChunkFilename);
283
+
284
+ if (set === undefined) {
285
+ staticUrls.set(staticChunkFilename, set = new Set());
286
+ }
287
+
288
+ set.add(c.id);
289
+ };
290
+
291
+ for (const [filename, chunks] of chunkFilenames) {
292
+ if (filename !== dynamicFilename) {
293
+ for (const c of chunks) addStaticUrl(c, filename);
294
+ } else {
295
+ for (const c of chunks) dynamicUrlChunks.add(c);
296
+ }
297
+ }
298
+ /**
299
+ * @param {function(Chunk): string | number} fn function from chunk to value
300
+ * @returns {string} code with static mapping of results of fn
301
+ */
302
+
303
+
304
+ const createMap = fn => {
305
+ const obj = {};
306
+ let useId = false;
307
+ let lastKey;
308
+ let entries = 0;
309
+
310
+ for (const c of dynamicUrlChunks) {
311
+ const value = fn(c);
312
+
313
+ if (value === c.id) {
314
+ useId = true;
315
+ } else {
316
+ obj[c.id] = value;
317
+ lastKey = c.id;
318
+ entries++;
319
+ }
320
+ }
321
+
322
+ if (entries === 0) return 'chunkId';
323
+
324
+ if (entries === 1) {
325
+ return useId ? `(chunkId === ${JSON.stringify(lastKey)} ? ${JSON.stringify(obj[lastKey])} : chunkId)` : JSON.stringify(obj[lastKey]);
326
+ }
327
+
328
+ return useId ? `(${JSON.stringify(obj)}[chunkId] || chunkId)` : `${JSON.stringify(obj)}[chunkId]`;
329
+ };
330
+ /**
331
+ * @param {function(Chunk): string | number} fn function from chunk to value
332
+ * @returns {string} code with static mapping of results of fn for including in quoted string
333
+ */
334
+
335
+
336
+ const mapExpr = fn => {
337
+ return `" + ${createMap(fn)} + "`;
338
+ };
339
+ /**
340
+ * @param {function(Chunk): string | number} fn function from chunk to value
341
+ * @returns {function(number): string} function which generates code with static mapping of results of fn for including in quoted string for specific length
342
+ */
343
+
344
+
345
+ const mapExprWithLength = fn => length => {
346
+ return `" + ${createMap(c => `${fn(c)}`.slice(0, length))} + "`;
347
+ };
348
+
349
+ const url = dynamicFilename && compilation.getPath(JSON.stringify(dynamicFilename), {
350
+ hash: `" + ${_webpack.RuntimeGlobals.getFullHash}() + "`,
351
+ hashWithLength: length => `" + ${_webpack.RuntimeGlobals.getFullHash}().slice(0, ${length}) + "`,
352
+ chunk: {
353
+ id: `" + chunkId + "`,
354
+ hash: mapExpr(c => c.renderedHash),
355
+ hashWithLength: mapExprWithLength(c => c.renderedHash),
356
+ name: mapExpr(c => c.name || c.id),
357
+ contentHash: {
358
+ [contentType]: mapExpr(c => c.contentHash[contentType])
359
+ },
360
+ contentHashWithLength: {
361
+ [contentType]: mapExprWithLength(c => c.contentHash[contentType])
362
+ }
363
+ },
364
+ contentHashType: contentType
365
+ });
366
+ const cdn = `__CSS_CDN__`;
367
+ console.log('jolly', dynamicFilename, url, 'url', cdn, url.endsWith('.js'), typeof url, url.includes('.js'));
368
+ return _webpack.Template.asString([`// This function allow to reference ${includedChunksMessages.join(' and ')}`, `${global} = ${runtimeTemplate.basicFunction('chunkId', staticUrls.size > 0 ? ['// a return url for filenames not based on template', // it minimizes to `x===1?"...":x===2?"...":"..."`
369
+ _webpack.Template.asString(Array.from(staticUrls, ([url, ids]) => {
370
+ const condition = ids.size === 1 ? `chunkId === ${JSON.stringify(first(ids))}` : `{${Array.from(ids, id => `${JSON.stringify(id)}:1`).join(',')}}[chunkId]`;
371
+ return `if (${condition}) return window.${cdn}+${url};`;
372
+ })), '// b return url for filenames based on template', `return window.${cdn}+${url};`] : ['// c return url for filenames based on template', `return window.${cdn}+${url};`])};`]);
373
+ }
374
+
375
+ }
@@ -8,6 +8,5 @@ exports.configDummy = configDummy;
8
8
  var _dummy = require("../custom_plugins/dummy");
9
9
 
10
10
  function configDummy(options) {
11
- console.log('running');
12
11
  return new _dummy.Dummy();
13
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.5",
3
+ "version": "0.0.6-exp.7",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {