@zohodesk/client_build_tool 0.0.3 → 0.0.5-exp.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog and Release Notes
2
2
 
3
- ## v0.0.2 (28-04-2023)
3
+ ## v0.0.5 (6-08-2023)
4
+
5
+ **Changes:--**
6
+ - Typo fix in i18nRuntimeDealerPlugin.js
7
+ - fixing some bugs in resolvers.js file
8
+
9
+ ## v0.0.3 (1-08-2023)
4
10
 
5
11
  **Changes:--**
6
12
  - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
package/README.md CHANGED
@@ -84,7 +84,13 @@ These commands provide flexibility and control over your client-side build proce
84
84
  For more [Details](ConfigurationDocumentation.md)
85
85
  # Changelog and Release Notes
86
86
 
87
- ## v0.0.2 (28-04-2023)
87
+ ## v0.0.5 (6-08-2023)
88
+
89
+ **Changes:--**
90
+ - Typo fix in i18nRuntimeDealerPlugin.js
91
+ - fixing some bugs in resolvers.js file
92
+
93
+ ## v0.0.3 (1-08-2023)
88
94
 
89
95
  **Changes:--**
90
96
  - `devtool` default value changed from `hidden-cheap-source-map` to `source-map`
@@ -145,7 +145,7 @@ class I18nRuntimeDealerPlugin {
145
145
  if (chunkFilenameHasContentHash) {
146
146
  compilation.hooks.processAssets.tap({
147
147
  name: pluginName,
148
- stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_DERIVED // additionalAssets: true
148
+ stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS // additionalAssets: true
149
149
 
150
150
  }, assets => {
151
151
  // eslint-disable-next-line no-underscore-dangle
@@ -174,28 +174,32 @@ class I18nRuntimeDealerPlugin {
174
174
  runtimeFileName,
175
175
  runtimeFileSourceStr,
176
176
  i18nChunks
177
- })); // NOTE: we don't delete, Because of HTML plugin needs to add runtime file in html and efc
177
+ })); // NOTE: we don't delete, Because of HTML plugin needs to add runtime file in html and efc
178
178
  // compilation.deleteAsset(runtimeFileName);
179
179
  }
180
180
  });
181
181
  compilation.hooks.processAssets.tap({
182
182
  name: pluginName,
183
- stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE // additionalAssets: true
183
+ stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS // additionalAssets: true
184
184
 
185
185
  }, () => {
186
- // eslint-disable-next-line no-underscore-dangle
186
+ console.log('delete starts ==== '); // eslint-disable-next-line no-underscore-dangle
187
+
187
188
  const entries = compilation._getChunkGraphEntries(); // eslint-disable-next-line no-restricted-syntax
188
189
 
189
190
 
190
191
  for (const entryChunk of entries) {
191
192
  const runtimeFileName = [...entryChunk.files][0] || '';
193
+ console.log(runtimeFileName, 'runtimeFile==');
192
194
 
193
- if (runtimeFileName.includes('runtime') && runtimeFileName.includes('[local]')) {
195
+ if (runtimeFileName.includes('runtime') && runtimeFileName.includes('[locale]')) {
194
196
  (0, _logger.verboseLogger)('deleteAsset', runtimeFileName);
197
+ console.log('deleted successuly====');
195
198
  compilation.deleteAsset(runtimeFileName);
196
199
  }
197
200
  }
198
201
  });
202
+ console.log('completed ====');
199
203
  }
200
204
  }
201
205
 
@@ -18,7 +18,7 @@ class SourceMapPlugin {
18
18
  compiler.hooks.thisCompilation.tap(pluginName, compilation => {
19
19
  compilation.hooks.processAssets.tap({
20
20
  name: pluginName,
21
- stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL
21
+ stage: _webpack.Compilation.PROCESS_ASSETS_STAGE_DERIVED
22
22
  }, assets => {
23
23
  Object.keys(assets).forEach(assetName => {
24
24
  const assetCode = assets[assetName].source();
@@ -77,5 +77,5 @@ function loaderResolver(options) {
77
77
 
78
78
  function useAppNodeModulesAsPreferred(preferLocalFirst = false, paths = []) {
79
79
  const filteredPaths = paths.filter(Boolean);
80
- return preferLocalFirst ? ['node_modules', ...filteredPaths] : [...filteredPaths, 'node_modules'];
80
+ return preferLocalFirst ? ['node_modules', ...filteredPaths, _constants.appNodeModules] : [...filteredPaths, 'node_modules', _constants.appNodeModules];
81
81
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.cliRootPath = exports.cliNodeModulesPath = exports.babelrcPath = exports.appPath = exports.CONFIG_ROOT = exports.BASE_CONFIG_KEY = void 0;
6
+ exports.cliRootPath = exports.cliNodeModulesPath = exports.babelrcPath = exports.appPath = exports.appNodeModules = exports.CONFIG_ROOT = exports.BASE_CONFIG_KEY = void 0;
7
7
  exports.getTemplatePath = getTemplatePath;
8
8
  exports.joinWithAppPath = joinWithAppPath;
9
9
  exports.templatesPath = void 0;
@@ -36,6 +36,9 @@ function joinWithAppPath(filePath) {
36
36
  return (0, _path.join)(appPath, filePath);
37
37
  }
38
38
 
39
+ ;
40
+ const appNodeModules = joinWithAppPath('node_modules');
41
+ exports.appNodeModules = appNodeModules;
39
42
  const templatesPath = (0, _path.join)(__dirname, '..', '..', 'templates');
40
43
  exports.templatesPath = templatesPath;
41
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.3",
3
+ "version": "0.0.5-exp.2",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {