@zohodesk/client_build_tool 0.0.9-exp.8 → 0.0.10-exp.1
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 +74 -0
- package/README_backup.md +74 -0
- package/lib/schemas/defaultConfigValues.js +0 -41
- package/lib/schemas/defaultConfigValuesOnly.js +0 -13
- package/lib/shared/bundler/webpack/jsLoaders.js +2 -15
- package/lib/shared/bundler/webpack/plugins.js +2 -21
- package/npm-shrinkwrap.json +8661 -33
- package/package.json +2 -2
- package/lib/shared/bundler/webpack/common/hashUtils.js +0 -20
- package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexHtmlInjectorPlugin.js +0 -47
- package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin.js +0 -190
- package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectAstKeys.js +0 -98
- package/lib/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +0 -94
- package/lib/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +0 -201
- package/lib/shared/bundler/webpack/pluginConfigs/configI18nNumericIndexPlugin.js +0 -113
package/README.md
CHANGED
|
@@ -176,6 +176,80 @@ First Release
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
+
**Feature:-**
|
|
180
|
+
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
181
|
+
- to use externals, we use the following pattern in `app > externals` :
|
|
182
|
+
|
|
183
|
+
For example
|
|
184
|
+
```
|
|
185
|
+
externals: {
|
|
186
|
+
<key> : <value>
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## v0.0.6 (4-09-2023)
|
|
191
|
+
|
|
192
|
+
**Feature:-**
|
|
193
|
+
- 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`.
|
|
194
|
+
- Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
|
|
195
|
+
- added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
|
|
196
|
+
only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
|
|
197
|
+
- added support for glob pattern for custom chunks split logic.
|
|
198
|
+
- added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
|
|
199
|
+
|
|
200
|
+
**Change:-**
|
|
201
|
+
- i18n name not generated issue fix.
|
|
202
|
+
- public path not correctly set issue fix.
|
|
203
|
+
- changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
|
|
204
|
+
## v0.0.5 (6-08-2023)
|
|
205
|
+
|
|
206
|
+
**Changes:--**
|
|
207
|
+
- Typo fix in i18nRuntimeDealerPlugin.js
|
|
208
|
+
- fixing some bugs in resolvers.js file
|
|
209
|
+
|
|
210
|
+
## v0.0.3 (1-08-2023)
|
|
211
|
+
|
|
212
|
+
**Changes:--**
|
|
213
|
+
- `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
|
|
214
|
+
- unwanted files deleted from build
|
|
215
|
+
|
|
216
|
+
**Issue Fix:--**
|
|
217
|
+
- The issue with the source map not being created in the build has been fixed."
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## v0.0.2 (28-04-2023)
|
|
221
|
+
|
|
222
|
+
**Features:-**
|
|
223
|
+
|
|
224
|
+
- `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)
|
|
225
|
+
- `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)
|
|
226
|
+
- `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.
|
|
227
|
+
- `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.
|
|
228
|
+
- `enableChunkHash` renamed as `enableFileNameHashing`
|
|
229
|
+
|
|
230
|
+
- `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`)
|
|
231
|
+
- `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
|
|
232
|
+
- `removeAttribute` option changes as `babelCustomizations.removeAttribute`
|
|
233
|
+
- `removePropTypes` support for remove the prop types package in the output build.
|
|
234
|
+
- `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
|
|
235
|
+
- `manifestJson` default value set as false.
|
|
236
|
+
- `customAttributes` support for add attributes to html, link , script tag in the output build.
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
## v0.0.1 (18-04-2023)
|
|
240
|
+
|
|
241
|
+
First Release
|
|
242
|
+
**Features:-**
|
|
243
|
+
|
|
244
|
+
- 'start' command to run react app
|
|
245
|
+
- 'build' command to create build for react app
|
|
246
|
+
- 'build:lib' command to create lib for react library
|
|
247
|
+
- 'build:es' command to create es for react library
|
|
248
|
+
- 'templates' command to create es for react library
|
|
249
|
+
# Changelog and Release Notes
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
179
253
|
**Feature:-**
|
|
180
254
|
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
181
255
|
- to use externals, we use the following pattern in `app > externals` :
|
package/README_backup.md
CHANGED
|
@@ -102,6 +102,80 @@ fixes :-
|
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
105
|
+
**Feature:-**
|
|
106
|
+
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
107
|
+
- to use externals, we use the following pattern in `app > externals` :
|
|
108
|
+
|
|
109
|
+
For example
|
|
110
|
+
```
|
|
111
|
+
externals: {
|
|
112
|
+
<key> : <value>
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## v0.0.6 (4-09-2023)
|
|
117
|
+
|
|
118
|
+
**Feature:-**
|
|
119
|
+
- 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`.
|
|
120
|
+
- Added Resource Cleanup plugin to cleanup resource retained by build tool. this plugin is controlled by efc flag resourcecleanup flag.
|
|
121
|
+
- added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
|
|
122
|
+
only will be activate when `resourceHints` => `allowPrefetchingMultipleChunks` as `true`
|
|
123
|
+
- added support for glob pattern for custom chunks split logic.
|
|
124
|
+
- added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
|
|
125
|
+
|
|
126
|
+
**Change:-**
|
|
127
|
+
- i18n name not generated issue fix.
|
|
128
|
+
- public path not correctly set issue fix.
|
|
129
|
+
- changing plugin hook stages in i18nRuntimePlugin and sourceMapPlugin
|
|
130
|
+
## v0.0.5 (6-08-2023)
|
|
131
|
+
|
|
132
|
+
**Changes:--**
|
|
133
|
+
- Typo fix in i18nRuntimeDealerPlugin.js
|
|
134
|
+
- fixing some bugs in resolvers.js file
|
|
135
|
+
|
|
136
|
+
## v0.0.3 (1-08-2023)
|
|
137
|
+
|
|
138
|
+
**Changes:--**
|
|
139
|
+
- `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
|
|
140
|
+
- unwanted files deleted from build
|
|
141
|
+
|
|
142
|
+
**Issue Fix:--**
|
|
143
|
+
- The issue with the source map not being created in the build has been fixed."
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## v0.0.2 (28-04-2023)
|
|
147
|
+
|
|
148
|
+
**Features:-**
|
|
149
|
+
|
|
150
|
+
- `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)
|
|
151
|
+
- `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)
|
|
152
|
+
- `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.
|
|
153
|
+
- `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.
|
|
154
|
+
- `enableChunkHash` renamed as `enableFileNameHashing`
|
|
155
|
+
|
|
156
|
+
- `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`)
|
|
157
|
+
- `createSeparateSmap` flag `source_map_enable` renamed as `enable_smap`
|
|
158
|
+
- `removeAttribute` option changes as `babelCustomizations.removeAttribute`
|
|
159
|
+
- `removePropTypes` support for remove the prop types package in the output build.
|
|
160
|
+
- `devConsoleExclude` support for remove the _console statements_ such as _console.log_, _console.warn_ in the output build.
|
|
161
|
+
- `manifestJson` default value set as false.
|
|
162
|
+
- `customAttributes` support for add attributes to html, link , script tag in the output build.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## v0.0.1 (18-04-2023)
|
|
166
|
+
|
|
167
|
+
First Release
|
|
168
|
+
**Features:-**
|
|
169
|
+
|
|
170
|
+
- 'start' command to run react app
|
|
171
|
+
- 'build' command to create build for react app
|
|
172
|
+
- 'build:lib' command to create lib for react library
|
|
173
|
+
- 'build:es' command to create es for react library
|
|
174
|
+
- 'templates' command to create es for react library
|
|
175
|
+
# Changelog and Release Notes
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
105
179
|
**Feature:-**
|
|
106
180
|
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
107
181
|
- to use externals, we use the following pattern in `app > externals` :
|
|
@@ -173,47 +173,6 @@ var _default = {
|
|
|
173
173
|
jsResource: null,
|
|
174
174
|
propertiesFolder: null
|
|
175
175
|
},
|
|
176
|
-
i18nIndexing: {
|
|
177
|
-
enable: {
|
|
178
|
-
value: false,
|
|
179
|
-
cli: 'i18n_idx_enable'
|
|
180
|
-
},
|
|
181
|
-
disableDefaultMerge: {
|
|
182
|
-
value: false,
|
|
183
|
-
cli: 'i18n_idx_disable_default_merge'
|
|
184
|
-
},
|
|
185
|
-
htmlTemplateLabel: {
|
|
186
|
-
value: '{{--user-locale}}',
|
|
187
|
-
cli: 'i18n_idx_html_template_label'
|
|
188
|
-
},
|
|
189
|
-
localeVarName: {
|
|
190
|
-
value: 'window.userLangCode',
|
|
191
|
-
cli: 'i18n_idx_locale_var_name'
|
|
192
|
-
},
|
|
193
|
-
jsResourcePath: {
|
|
194
|
-
value: './deskapp/properties/JSResources.properties',
|
|
195
|
-
cli: 'i18n_idx_js_resource_path'
|
|
196
|
-
},
|
|
197
|
-
propertiesFolderPath: {
|
|
198
|
-
value: './deskapp/properties',
|
|
199
|
-
cli: 'i18n_idx_properties_folder_path'
|
|
200
|
-
},
|
|
201
|
-
propertiesPattern: {
|
|
202
|
-
value: ''
|
|
203
|
-
},
|
|
204
|
-
numericMapPath: {
|
|
205
|
-
value: './deskapp/properties/i18n-numeric-map.json',
|
|
206
|
-
cli: 'i18n_idx_numeric_map_path'
|
|
207
|
-
},
|
|
208
|
-
jsonpFunc: {
|
|
209
|
-
value: 'window.loadI18nData',
|
|
210
|
-
cli: 'i18n_idx_jsonp_func'
|
|
211
|
-
},
|
|
212
|
-
fallbackToHash: {
|
|
213
|
-
value: true,
|
|
214
|
-
cli: 'i18n_idx_fallback_to_hash'
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
176
|
publicFolders: ['...'],
|
|
218
177
|
app: {
|
|
219
178
|
entryFile: {
|
|
@@ -96,19 +96,6 @@ var _default = {
|
|
|
96
96
|
jsResource: null,
|
|
97
97
|
propertiesFolder: null
|
|
98
98
|
},
|
|
99
|
-
i18nIndexing: {
|
|
100
|
-
enable: false,
|
|
101
|
-
disableDefaultMerge: false,
|
|
102
|
-
htmlTemplateLabel: '{{--user-locale}}',
|
|
103
|
-
localeVarName: 'window.userLangCode',
|
|
104
|
-
jsResourcePath: './deskapp/properties/JSResources.properties',
|
|
105
|
-
propertiesFolderPath: './deskapp/properties',
|
|
106
|
-
propertiesPattern: '',
|
|
107
|
-
numericMapPath: './deskapp/properties/i18n-numeric-map.json',
|
|
108
|
-
numericJsonpFunc: 'window.loadI18nChunk',
|
|
109
|
-
dynamicJsonpFunc: 'window.loadI18nChunk',
|
|
110
|
-
fallbackToHash: true
|
|
111
|
-
},
|
|
112
99
|
publicFolders: ['...', {
|
|
113
100
|
source: './deskapp/tp/',
|
|
114
101
|
target: './tp/'
|
|
@@ -7,24 +7,11 @@ exports.jsLoaders = jsLoaders;
|
|
|
7
7
|
|
|
8
8
|
var _babelLoaderConfig = require("./loaderConfigs/babelLoaderConfig");
|
|
9
9
|
|
|
10
|
-
var {
|
|
11
|
-
i18nIdReplaceLoaderConfig
|
|
12
|
-
} = require("./loaderConfigs/i18nIdReplaceLoaderConfig");
|
|
13
|
-
|
|
14
10
|
function jsLoaders(options) {
|
|
15
|
-
const useLoaders = [(0, _babelLoaderConfig.babelLoaderConfig)(options)];
|
|
16
|
-
|
|
17
|
-
if (options.i18nIndexing && options.i18nIndexing.enable) {
|
|
18
|
-
const i18nLoader = i18nIdReplaceLoaderConfig(options);
|
|
19
|
-
|
|
20
|
-
if (i18nLoader) {
|
|
21
|
-
useLoaders.push(i18nLoader);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
11
|
return [{
|
|
26
12
|
test: /\.js$/,
|
|
27
13
|
exclude: /node_modules/,
|
|
28
|
-
use:
|
|
14
|
+
use: [(0, _babelLoaderConfig.babelLoaderConfig)(options)] // include: path.join(appPath, folder)
|
|
15
|
+
|
|
29
16
|
}];
|
|
30
17
|
}
|
|
@@ -49,29 +49,10 @@ var _configRuntimeResourceCleanup = require("./pluginConfigs/configRuntimeResour
|
|
|
49
49
|
|
|
50
50
|
var _configCustomScriptLoadingStrategyPlugin = require("./pluginConfigs/configCustomScriptLoadingStrategyPlugin");
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
configI18nNumericIndexPlugin
|
|
54
|
-
} = require("./pluginConfigs/configI18nNumericIndexPlugin");
|
|
55
|
-
|
|
52
|
+
// import { IgnorePlugin } from 'webpack';
|
|
56
53
|
function plugins(options) {
|
|
57
54
|
const {
|
|
58
55
|
webpackPlugins
|
|
59
56
|
} = options;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (options.i18nIndexing && options.i18nIndexing.enable) {
|
|
63
|
-
const newI18nPlugins = configI18nNumericIndexPlugin(options);
|
|
64
|
-
|
|
65
|
-
if (newI18nPlugins) {
|
|
66
|
-
pluginConfigurations.push(...newI18nPlugins);
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
const configI18nSplitPlugin = (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options);
|
|
70
|
-
|
|
71
|
-
if (configI18nSplitPlugin) {
|
|
72
|
-
pluginConfigurations.push(configI18nSplitPlugin);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return [...pluginConfigurations, ...webpackPlugins].filter(Boolean);
|
|
57
|
+
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), ...webpackPlugins].filter(Boolean);
|
|
77
58
|
}
|