@zohodesk/client_build_tool 0.0.6-exp.4 → 0.0.6-exp.5
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 +222 -0
- package/README_backup.md +222 -0
- package/lib/commands/buildEs/commandExecutor.js +7 -2
- package/lib/commands/buildLib/commandExecutor.js +7 -2
- package/lib/schemas/defaultConfigValues.js +1 -6
- package/lib/shared/babel/babelWebConfig.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/dummy/index.js +54 -0
- package/lib/shared/bundler/webpack/pluginConfigs/configDummy.js +13 -0
- package/lib/shared/bundler/webpack/plugins.js +3 -1
- package/lib/shared/bundler/webpack/webpackConfig.js +1 -3
- package/lib/shared/fileUtils/watchRun.js +1 -13
- package/package.json +2 -5
- package/lib/shared/babel/runBabelForTsFile.js +0 -31
- package/lib/shared/bundler/webpack/tsLoaders.js +0 -24
package/README.md
CHANGED
|
@@ -86,6 +86,228 @@ 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
|
+
|
|
89
311
|
**Feature:-**
|
|
90
312
|
- externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
|
|
91
313
|
- to use externals, we use the following pattern in `app > externals` :
|
package/README_backup.md
CHANGED
|
@@ -82,3 +82,225 @@ 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
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.commandExecutor = commandExecutor;
|
|
7
7
|
|
|
8
|
+
var _constants = require("../../shared/constants");
|
|
9
|
+
|
|
8
10
|
var _watchRun = require("../../shared/fileUtils/watchRun");
|
|
9
11
|
|
|
10
12
|
function commandExecutor(options) {
|
|
@@ -18,10 +20,13 @@ function commandExecutor(options) {
|
|
|
18
20
|
extraArgs.splice(index, 1);
|
|
19
21
|
}
|
|
20
22
|
|
|
23
|
+
let [src, target] = extraArgs;
|
|
24
|
+
src = (0, _constants.joinWithAppPath)(src || 'src');
|
|
25
|
+
target = (0, _constants.joinWithAppPath)(target || 'es');
|
|
21
26
|
(0, _watchRun.watchRun)({
|
|
22
27
|
options,
|
|
23
|
-
src
|
|
24
|
-
target
|
|
28
|
+
src,
|
|
29
|
+
target,
|
|
25
30
|
canWatch,
|
|
26
31
|
mode: 'es'
|
|
27
32
|
});
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.commandExecutor = commandExecutor;
|
|
7
7
|
|
|
8
|
+
var _constants = require("../../shared/constants");
|
|
9
|
+
|
|
8
10
|
var _watchRun = require("../../shared/fileUtils/watchRun");
|
|
9
11
|
|
|
10
12
|
function commandExecutor(options) {
|
|
@@ -18,10 +20,13 @@ function commandExecutor(options) {
|
|
|
18
20
|
extraArgs.splice(index, 1);
|
|
19
21
|
}
|
|
20
22
|
|
|
23
|
+
let [src, target] = extraArgs;
|
|
24
|
+
src = (0, _constants.joinWithAppPath)(src || 'src');
|
|
25
|
+
target = (0, _constants.joinWithAppPath)(target || 'lib');
|
|
21
26
|
(0, _watchRun.watchRun)({
|
|
22
27
|
options,
|
|
23
|
-
src
|
|
24
|
-
target
|
|
28
|
+
src,
|
|
29
|
+
target,
|
|
25
30
|
canWatch,
|
|
26
31
|
mode: 'lib'
|
|
27
32
|
});
|
|
@@ -26,7 +26,7 @@ function babelWebConfig(options, mode) {
|
|
|
26
26
|
browserList
|
|
27
27
|
} = options.babelCustomizations;
|
|
28
28
|
return {
|
|
29
|
-
presets: [getBabelPresetEnvConfig(browserList, mode), require.resolve('@babel/preset-react')
|
|
29
|
+
presets: [getBabelPresetEnvConfig(browserList, mode), require.resolve('@babel/preset-react')],
|
|
30
30
|
plugins: customBabelPlugins(babelPlugins).concat((0, _getBabelPlugin.getBabelPlugin)(options)).filter(Boolean)
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Dummy = void 0;
|
|
7
|
+
|
|
8
|
+
var _webpack = require("webpack");
|
|
9
|
+
|
|
10
|
+
class Dummy {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.variableName = '__CSS_CDN__';
|
|
13
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
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
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
exports.Dummy = Dummy;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.configDummy = configDummy;
|
|
7
|
+
|
|
8
|
+
var _dummy = require("../custom_plugins/dummy");
|
|
9
|
+
|
|
10
|
+
function configDummy(options) {
|
|
11
|
+
console.log('running');
|
|
12
|
+
return new _dummy.Dummy();
|
|
13
|
+
}
|
|
@@ -47,10 +47,12 @@ var _configBundleIntegrityReport = require("./pluginConfigs/configBundleIntegrit
|
|
|
47
47
|
|
|
48
48
|
var _configRuntimeResourceCleanup = require("./pluginConfigs/configRuntimeResourceCleanup");
|
|
49
49
|
|
|
50
|
+
var _configDummy = require("./pluginConfigs/configDummy");
|
|
51
|
+
|
|
50
52
|
// import { IgnorePlugin } from 'webpack';
|
|
51
53
|
function plugins(options) {
|
|
52
54
|
const {
|
|
53
55
|
webpackPlugins
|
|
54
56
|
} = options;
|
|
55
|
-
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, _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);
|
|
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, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configEFCTemplatePlugin.configEFCTemplatePlugin)(options), (0, _configResourceHintsPlugin.configResourceHintsPlugin)(options), (0, _configBundleAnalyzer.configBundleAnalyzer)(options), (0, _configManifestJsonPlugin.configManifestJsonPlugin)(options), (0, _configSourceMapPlugin.configSourceMapPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options), (0, _configBundleIntegrityReport.configBundleIntegrityReport)(options), (0, _configRuntimeResourceCleanup.configRuntimeResourceCleanup)(options), (0, _configDummy.configDummy)(options), ...webpackPlugins].filter(Boolean);
|
|
56
58
|
}
|
|
@@ -11,8 +11,6 @@ var _outputConfig = require("./outputConfig");
|
|
|
11
11
|
|
|
12
12
|
var _jsLoaders = require("./jsLoaders");
|
|
13
13
|
|
|
14
|
-
var _tsLoaders = require("./tsLoaders");
|
|
15
|
-
|
|
16
14
|
var _cssLoaders = require("./cssLoaders");
|
|
17
15
|
|
|
18
16
|
var _assetLoaders = require("./loaderConfigs/assetLoaders");
|
|
@@ -48,7 +46,7 @@ function webpackConfigCreator(options) {
|
|
|
48
46
|
module: {
|
|
49
47
|
/* strictExportPresence for break the build when imported module not present in respective file */
|
|
50
48
|
// strictExportPresence: true,
|
|
51
|
-
rules: [...(0, _jsLoaders.jsLoaders)(options), ...(0,
|
|
49
|
+
rules: [...(0, _jsLoaders.jsLoaders)(options), ...(0, _cssLoaders.cssLoaders)(options), (0, _configWebWorkerLoader.configWebWorkerLoader)(options), (0, _configHtmlTemplateLoader.configHtmlTemplateLoader)(options), ...(0, _assetLoaders.assetLoaders)(options), ...(0, _configCustomLoaders.configCustomLoaders)(options)]
|
|
52
50
|
},
|
|
53
51
|
plugins: (0, _plugins.plugins)(options),
|
|
54
52
|
externals: (0, _externals.externals)(options),
|
|
@@ -11,8 +11,6 @@ var _watcher = _interopRequireDefault(require("watcher"));
|
|
|
11
11
|
|
|
12
12
|
var _runBabelForJSFile = require("../babel/runBabelForJSFile");
|
|
13
13
|
|
|
14
|
-
var _runBabelForTsFile = require("../babel/runBabelForTsFile");
|
|
15
|
-
|
|
16
14
|
var _runPostCssForCssFile = require("../postcss/runPostCssForCssFile");
|
|
17
15
|
|
|
18
16
|
var _directoryIterator = require("./directoryIterator");
|
|
@@ -25,8 +23,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25
23
|
|
|
26
24
|
const isJs = ext => ext === '.js';
|
|
27
25
|
|
|
28
|
-
const isTs = ext => ext === '.ts';
|
|
29
|
-
|
|
30
26
|
const isCss = ext => ext === '.css';
|
|
31
27
|
|
|
32
28
|
function watchRun({
|
|
@@ -58,13 +54,6 @@ function watchRun({
|
|
|
58
54
|
outputFile,
|
|
59
55
|
options
|
|
60
56
|
});
|
|
61
|
-
} else if (isTs(ext)) {
|
|
62
|
-
(0, _runBabelForTsFile.runBabelForTSFile)({
|
|
63
|
-
filename,
|
|
64
|
-
outputFile,
|
|
65
|
-
options,
|
|
66
|
-
mode
|
|
67
|
-
});
|
|
68
57
|
} else {
|
|
69
58
|
(0, _copyFile.copyFile)(filename, outputFile);
|
|
70
59
|
}
|
|
@@ -92,8 +81,7 @@ function watchRun({
|
|
|
92
81
|
const watcher = new _watcher.default(src, {
|
|
93
82
|
recursive: true,
|
|
94
83
|
ignoreInitial: true,
|
|
95
|
-
ignore: filename => filename.indexOf('__tests__') !== -1
|
|
96
|
-
|
|
84
|
+
ignore: filename => filename.indexOf('__tests__') !== -1
|
|
97
85
|
});
|
|
98
86
|
watcher.on('all', (event, filename) => {
|
|
99
87
|
if (event === 'unlink' || event === 'unlinkDir') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/client_build_tool",
|
|
3
|
-
"version": "0.0.6-exp.
|
|
3
|
+
"version": "0.0.6-exp.5",
|
|
4
4
|
"description": "A CLI tool to build web applications and client libraries",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -55,9 +55,6 @@
|
|
|
55
55
|
"webpack": "5.79.0",
|
|
56
56
|
"webpack-bundle-analyzer": "4.8.0",
|
|
57
57
|
"webpack-cli": "4.10.0",
|
|
58
|
-
"webpack-dev-middleware": "6.1.1"
|
|
59
|
-
"typescript": "5.2.2",
|
|
60
|
-
"ts-loader": "8.2.0",
|
|
61
|
-
"@babel/preset-typescript": "7.23.2"
|
|
58
|
+
"webpack-dev-middleware": "6.1.1"
|
|
62
59
|
}
|
|
63
60
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.runBabelForTSFile = runBabelForTSFile;
|
|
7
|
-
|
|
8
|
-
var _core = require("@babel/core");
|
|
9
|
-
|
|
10
|
-
var _babelWebConfig = require("./babelWebConfig");
|
|
11
|
-
|
|
12
|
-
var _copyFile = require("../fileUtils/copyFile");
|
|
13
|
-
|
|
14
|
-
function runBabelForTSFile({
|
|
15
|
-
filename,
|
|
16
|
-
outputFile,
|
|
17
|
-
options,
|
|
18
|
-
mode = 'es'
|
|
19
|
-
}) {
|
|
20
|
-
const {
|
|
21
|
-
enable
|
|
22
|
-
} = options.typeScript;
|
|
23
|
-
console.log('typescript', enable);
|
|
24
|
-
|
|
25
|
-
if (enable) {
|
|
26
|
-
// const jsSourceCode = readFileSync(filename).toString();
|
|
27
|
-
const babelConfig = (0, _babelWebConfig.babelWebConfig)(options, mode);
|
|
28
|
-
const result = (0, _core.transformFileSync)(filename, babelConfig);
|
|
29
|
-
(0, _copyFile.writeFile)(outputFile.replace('.ts', '.js'), result.code);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.tsLoaders = tsLoaders;
|
|
7
|
-
|
|
8
|
-
function tsLoaders(options) {
|
|
9
|
-
const {
|
|
10
|
-
enable
|
|
11
|
-
} = options.typeScript;
|
|
12
|
-
console.log('typescript', enable);
|
|
13
|
-
|
|
14
|
-
if (enable) {
|
|
15
|
-
return [{
|
|
16
|
-
test: /\.(ts|tsx)$/,
|
|
17
|
-
exclude: /node_modules/,
|
|
18
|
-
use: 'ts-loader' // include: path.join(appPath, folder)
|
|
19
|
-
|
|
20
|
-
}];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return [];
|
|
24
|
-
}
|