@zohodesk/client_build_tool 0.0.11-exp.16 → 0.0.11-exp.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/README.md +0 -204
  2. package/README_backup.md +0 -204
  3. package/docs/DYNAMIC_TEMPLATE_EXAMPLE.md +129 -0
  4. package/docs/I18N_NUMERIC_INDEXING_PLUGIN.md +225 -0
  5. package/docs/I18N_SINGLE_FILE_MODE.md +126 -0
  6. package/docs/client_build_tool_source_doc.md +390 -0
  7. package/example-single-file-config.js +59 -0
  8. package/lib/allCommandsConfigs.js +2 -7
  9. package/lib/commands/build/commandExecutor.js +1 -5
  10. package/lib/commands/build/config.js +2 -3
  11. package/lib/commands/build/optionsProcessor.js +2 -5
  12. package/lib/commands/build/preProcessor.js +0 -2
  13. package/lib/commands/buildEs/commandExecutor.js +0 -5
  14. package/lib/commands/buildEs/config.js +2 -3
  15. package/lib/commands/buildEs/preProcessor.js +0 -2
  16. package/lib/commands/buildLib/commandExecutor.js +0 -5
  17. package/lib/commands/buildLib/config.js +2 -3
  18. package/lib/commands/buildLib/preProcessor.js +0 -2
  19. package/lib/commands/mockserver/commandExecutor.js +2 -9
  20. package/lib/commands/mockserver/config.js +2 -3
  21. package/lib/commands/pre_process/commandExecutor.js +0 -2
  22. package/lib/commands/pre_process/config.js +2 -3
  23. package/lib/commands/start/commandExecutor.js +0 -2
  24. package/lib/commands/start/config.js +2 -3
  25. package/lib/commands/start/optionsProcessor.js +2 -4
  26. package/lib/commands/start/preProcessor.js +0 -2
  27. package/lib/commands/template/commandExecutor.js +0 -7
  28. package/lib/commands/template/config.js +2 -3
  29. package/lib/commands/version/commandExecutor.js +0 -3
  30. package/lib/commands/version/config.js +2 -3
  31. package/lib/commandsRouter.js +5 -21
  32. package/lib/index.js +0 -2
  33. package/lib/logger.js +0 -5
  34. package/lib/schemas/applyValuesToSchema/index.js +0 -8
  35. package/lib/schemas/applyValuesToSchema/isObject.js +0 -1
  36. package/lib/schemas/applyValuesToSchema/isValid.js +0 -2
  37. package/lib/schemas/cliArgsToObject.js +2 -6
  38. package/lib/schemas/defaultConfigValues.js +31 -7
  39. package/lib/schemas/defaultConfigValuesOnly.js +4 -7
  40. package/lib/schemas/deprecatedOptionsHandler.js +7 -16
  41. package/lib/schemas/getNpmVersion.js +0 -5
  42. package/lib/schemas/giveDefaultValue.js +0 -3
  43. package/lib/schemas/npmConfigToObject.js +2 -5
  44. package/lib/schemas/readOptions.js +10 -30
  45. package/lib/schemas/readOptionsForConfigFile.js +2 -12
  46. package/lib/shared/babel/addDefaultPlugins.js +0 -2
  47. package/lib/shared/babel/babelWebConfig.js +1 -10
  48. package/lib/shared/babel/babel_plugins/removeAttributesPlugin.js +0 -4
  49. package/lib/shared/babel/getBabelPlugin.js +2 -7
  50. package/lib/shared/babel/runBabelForJSFile.js +1 -4
  51. package/lib/shared/babel/runBabelForTsFile.js +1 -5
  52. package/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -5
  53. package/lib/shared/bundler/webpack/common/libAlias.js +3 -3
  54. package/lib/shared/bundler/webpack/common/modeUtils.js +0 -5
  55. package/lib/shared/bundler/webpack/common/nameTemplates.js +11 -18
  56. package/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +2 -3
  57. package/lib/shared/bundler/webpack/configCustomLoaders.js +0 -1
  58. package/lib/shared/bundler/webpack/cssLoaders.js +0 -2
  59. package/lib/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/index.js +1 -20
  60. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/index.js +20 -25
  61. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +4 -9
  62. package/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +3 -23
  63. package/lib/shared/bundler/webpack/custom_plugins/EFCTemplatePlugin.js +8 -19
  64. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nGroupRuntimeModule.js +120 -0
  65. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexHtmlInjectorPlugin.js +81 -0
  66. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin.js +328 -0
  67. package/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/utils/i18nDataLoader.js +135 -0
  68. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nFilesEmitPlugin.js +5 -26
  69. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +13 -16
  70. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nRuntimeDealerPlugin.js +19 -53
  71. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/LocaleChunkAssetsStore.js +2 -17
  72. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ModulesI18nKeysStore.js +0 -13
  73. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +11 -21
  74. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -4
  75. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +4 -14
  76. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +3 -13
  77. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/iterateModulesInChunk.js +3 -12
  78. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +2 -7
  79. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -2
  80. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +2 -3
  81. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +2 -4
  82. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +8 -13
  83. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +2 -14
  84. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/getChunkModules.js +0 -1
  85. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +1 -3
  86. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -4
  87. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +20 -22
  88. package/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +3 -10
  89. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +1 -6
  90. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +1 -6
  91. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +0 -6
  92. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/findInitialFileNames.js +0 -1
  93. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/index.js +0 -7
  94. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/removeHashFromFileName.js +0 -1
  95. package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +13 -17
  96. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +6 -15
  97. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +4 -13
  98. package/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +4 -6
  99. package/lib/shared/bundler/webpack/custom_plugins/RuntimeResourceCleanup/index.js +0 -10
  100. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/classHandling.js +0 -3
  101. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/index.js +4 -20
  102. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/selectorWeightPrefixAdder.js +10 -12
  103. package/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/windowsModification.js +2 -3
  104. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +7 -20
  105. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +0 -1
  106. package/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +7 -10
  107. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/addHashToFilePath.js +1 -6
  108. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -16
  109. package/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/index.js.js +4 -11
  110. package/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js +3 -10
  111. package/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/index.js +27 -62
  112. package/lib/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +3 -15
  113. package/lib/shared/bundler/webpack/custom_plugins/emitAsset.js +0 -1
  114. package/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +2 -12
  115. package/lib/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +2 -7
  116. package/lib/shared/bundler/webpack/defaultVendorPatternList.js +2 -6
  117. package/lib/shared/bundler/webpack/devtoolConfig.js +0 -1
  118. package/lib/shared/bundler/webpack/entryConfig.js +0 -4
  119. package/lib/shared/bundler/webpack/externals.js +0 -1
  120. package/lib/shared/bundler/webpack/getCSSLoaders.js +1 -6
  121. package/lib/shared/bundler/webpack/getFilenameFromModule.js +1 -5
  122. package/lib/shared/bundler/webpack/jsLoaders.js +23 -4
  123. package/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -2
  124. package/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +2 -3
  125. package/lib/shared/bundler/webpack/loaderConfigs/checkIsPatternsMatchFilename.js +3 -12
  126. package/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -1
  127. package/lib/shared/bundler/webpack/loaderConfigs/configPostCssLoader.js +2 -10
  128. package/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -2
  129. package/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -12
  130. package/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +1 -15
  131. package/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +1 -4
  132. package/lib/shared/bundler/webpack/loaderConfigs/i18nIdReplaceLoaderConfig.js +72 -0
  133. package/lib/shared/bundler/webpack/loaders/i18nIdReplaceLoader.js +113 -0
  134. package/lib/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +2 -2
  135. package/lib/shared/bundler/webpack/loaders/workerLoader.js +8 -19
  136. package/lib/shared/bundler/webpack/optimizationConfig.js +5 -13
  137. package/lib/shared/bundler/webpack/outputConfig.js +1 -9
  138. package/lib/shared/bundler/webpack/pluginConfigs/configBundleAnalyzer.js +5 -9
  139. package/lib/shared/bundler/webpack/pluginConfigs/configBundleIntegrityReport.js +0 -5
  140. package/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +4 -9
  141. package/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +3 -8
  142. package/lib/shared/bundler/webpack/pluginConfigs/configCopyPublicFolders.js +1 -16
  143. package/lib/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +0 -4
  144. package/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +0 -16
  145. package/lib/shared/bundler/webpack/pluginConfigs/configEFCTemplatePlugin.js +0 -5
  146. package/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -5
  147. package/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +2 -8
  148. package/lib/shared/bundler/webpack/pluginConfigs/configI18nIndexingPlugin.js +38 -0
  149. package/lib/shared/bundler/webpack/pluginConfigs/configI18nNumericHtmlInjector.js +86 -0
  150. package/lib/shared/bundler/webpack/pluginConfigs/configI18nNumericIndexPlugin.js +92 -0
  151. package/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +3 -9
  152. package/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -2
  153. package/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +0 -7
  154. package/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +3 -7
  155. package/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +1 -5
  156. package/lib/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +1 -4
  157. package/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -4
  158. package/lib/shared/bundler/webpack/pluginConfigs/configRuntimeResourceCleanup.js +3 -8
  159. package/lib/shared/bundler/webpack/pluginConfigs/configSelectorWeightPlugin.js +1 -6
  160. package/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +3 -8
  161. package/lib/shared/bundler/webpack/pluginConfigs/configSourceMapPlugin.js +0 -4
  162. package/lib/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +1 -8
  163. package/lib/shared/bundler/webpack/pluginConfigs/configVariableConversionPlugin.js +1 -6
  164. package/lib/shared/bundler/webpack/plugins.js +3 -24
  165. package/lib/shared/bundler/webpack/resolvers.js +3 -17
  166. package/lib/shared/bundler/webpack/splitChunksConfig.js +2 -15
  167. package/lib/shared/bundler/webpack/statsConfig.js +2 -5
  168. package/lib/shared/bundler/webpack/tsLoaders.js +2 -4
  169. package/lib/shared/bundler/webpack/utils/index.js +1 -12
  170. package/lib/shared/bundler/webpack/utils/object-manipulation.js +2 -16
  171. package/lib/shared/bundler/webpack/utils/updateArrayWithDefault.js +0 -7
  172. package/lib/shared/bundler/webpack/webpackBuild.js +1 -8
  173. package/lib/shared/bundler/webpack/webpackConfig.js +0 -17
  174. package/lib/shared/commands-utils/doBasicRequirementCheck.js +0 -3
  175. package/lib/shared/commands-utils/getCliPath.js +5 -9
  176. package/lib/shared/commands-utils/index.js +0 -3
  177. package/lib/shared/commands-utils/log.js +0 -2
  178. package/lib/shared/commands-utils/readArgsFormCommandLine.js +0 -1
  179. package/lib/shared/commands-utils/readOptionFormCommandLine.js +0 -1
  180. package/lib/shared/commands-utils/spawnSyncIO.js +5 -13
  181. package/lib/shared/constants.js +9 -29
  182. package/lib/shared/fileUtils/copyFile.js +1 -8
  183. package/lib/shared/fileUtils/directoryIterator.js +0 -4
  184. package/lib/shared/fileUtils/watchRun.js +3 -24
  185. package/lib/shared/postcss/custom_postcss_plugins/EmptyPlugin.js +1 -6
  186. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/constants.js +2 -3
  187. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js +6 -13
  188. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/index.js +6 -26
  189. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/insertBefore.js +6 -9
  190. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js +0 -3
  191. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js +2 -7
  192. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js +0 -2
  193. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/specialCases.js +4 -9
  194. package/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js +0 -10
  195. package/lib/shared/postcss/custom_postcss_plugins/RTLSplitPlugin.js +16 -29
  196. package/lib/shared/postcss/custom_postcss_plugins/SelectorReplace.js +0 -17
  197. package/lib/shared/postcss/custom_postcss_plugins/ValueReplacer.js +4 -9
  198. package/lib/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +28 -64
  199. package/lib/shared/postcss/filterPluginsAllowedForSpecficFile.js +5 -13
  200. package/lib/shared/postcss/getAllowedPostCssPlugins.js +0 -3
  201. package/lib/shared/postcss/getSpecificPostCssPlugin.js +7 -17
  202. package/lib/shared/postcss/runPostCssForCssFile.js +1 -9
  203. package/lib/shared/pre_process/runPreProcess.js +0 -11
  204. package/lib/shared/server/configWebpackDevMiddleware.js +1 -8
  205. package/lib/shared/server/corsHandling.js +2 -6
  206. package/lib/shared/server/getIp.js +1 -7
  207. package/lib/shared/server/getServerURL.js +0 -6
  208. package/lib/shared/server/httpsOptions.js +0 -11
  209. package/lib/shared/server/initExpressApp.js +1 -4
  210. package/lib/shared/server/initialHTMLHandling.js +7 -16
  211. package/lib/shared/server/mockApiHandler.js +8 -16
  212. package/lib/shared/server/mockServer.js +0 -7
  213. package/lib/shared/server/serveContextFiles.js +1 -5
  214. package/lib/shared/server/serverBywebpackDevMiddleware.js +4 -9
  215. package/lib/shared/server/startHttpServer.js +0 -3
  216. package/lib/shared/server/startHttpsServer.js +1 -9
  217. package/lib/shared/server/unwanted/addHttp2Server.js +2 -7
  218. package/lib/shared/server/unwanted/configWebpackDevMiddleware.js +1 -8
  219. package/lib/shared/server/unwanted/mockApiSupport.js +0 -2
  220. package/lib/shared/server/unwanted/websocketMockSetup.js +1 -7
  221. package/lib/shared/server/urlConcat.js +3 -8
  222. package/lib/shared/utils/requireLocalOrGlobal.js +10 -25
  223. package/lib/shared/utils/versionPrint.js +1 -6
  224. package/npm-shrinkwrap.json +2 -2
  225. package/package.json +1 -1
  226. package/packages/client_build_tool/test-i18n-config.js +22 -0
@@ -4,24 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configCdnChangePlugin = configCdnChangePlugin;
7
-
8
7
  var _modeUtils = require("../common/modeUtils");
9
-
10
8
  var _CdnChangePlugin = _interopRequireDefault(require("../custom_plugins/CdnChangePlugin"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
10
  function configCdnChangePlugin(options) {
15
11
  const {
16
12
  cdnMapping,
17
13
  mode
18
14
  } = options;
19
-
20
15
  if (!cdnMapping.isCdnEnabled || (0, _modeUtils.isDevelopmentMode)(mode)) {
21
16
  return null;
22
17
  }
23
-
24
- return new _CdnChangePlugin.default({ ...cdnMapping,
18
+ return new _CdnChangePlugin.default({
19
+ ...cdnMapping,
25
20
  createSeparateSMap: options.createSeparateSMap
26
21
  });
27
22
  }
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configCopyPublicFolders = configCopyPublicFolders;
7
-
8
7
  var _path = _interopRequireDefault(require("path"));
9
-
10
8
  var _copyWebpackPlugin = _interopRequireDefault(require("copy-webpack-plugin"));
11
-
12
9
  var _fs = require("fs");
13
-
14
10
  var _updateArrayWithDefault = require("../utils/updateArrayWithDefault");
15
-
16
11
  var _constants = require("../../../constants");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
13
  const defaultPublicFolders = [{
21
14
  // source must be relative path not absolute path
22
15
  source: 'public',
@@ -24,15 +17,12 @@ const defaultPublicFolders = [{
24
17
  target: 'public',
25
18
  toType: 'dir'
26
19
  }];
27
-
28
20
  function folderPatterns(publicFolders) {
29
21
  return publicFolders.map(conf => {
30
22
  const publicFolderActualPath = (0, _constants.joinWithAppPath)(conf.source);
31
-
32
23
  if (!conf.source || !conf.target || _path.default.isAbsolute(conf.source) || !(0, _fs.existsSync)(publicFolderActualPath)) {
33
24
  return null;
34
25
  }
35
-
36
26
  return {
37
27
  from: publicFolderActualPath,
38
28
  to: conf.target,
@@ -40,24 +30,19 @@ function folderPatterns(publicFolders) {
40
30
  };
41
31
  }).filter(Boolean);
42
32
  }
43
-
44
33
  function configCopyPublicFolders(options) {
45
34
  let {
46
35
  publicFolders,
47
36
  mode = 'dev'
48
37
  } = options;
49
38
  publicFolders = (0, _updateArrayWithDefault.updateArrayWithDefault)(publicFolders[mode], defaultPublicFolders);
50
-
51
39
  if (publicFolders.length === 0) {
52
40
  return null;
53
41
  }
54
-
55
42
  const patterns = folderPatterns(publicFolders);
56
-
57
43
  if (patterns.length === 0) {
58
44
  return null;
59
45
  }
60
-
61
46
  return new _copyWebpackPlugin.default({
62
47
  patterns
63
48
  });
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configCustomAttributesPlugin = configCustomAttributesPlugin;
7
-
8
7
  var _custom_attribute_plugin = require("../custom_plugins/custom_attribute_plugin");
9
-
10
8
  function configCustomAttributesPlugin(options) {
11
9
  const {
12
10
  customAttributes
13
11
  } = options;
14
-
15
12
  if (customAttributes.enable) {
16
13
  return new _custom_attribute_plugin.CustomAttributesPlugin(customAttributes);
17
14
  }
18
-
19
15
  return null;
20
16
  }
@@ -4,65 +4,49 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configCustomScriptLoadingStrategyPlugin = configCustomScriptLoadingStrategyPlugin;
7
-
8
7
  var _CustomScriptLoadingPlugin = require("../custom_plugins/CustomScriptLoadingPlugin");
9
-
10
8
  var _utils = require("../utils");
11
-
12
9
  const defaultScriptLoadingStrategy = 'defer';
13
10
  const allowedScriptLoadingStrategies = ['blocking', 'defer', 'async', 'module'];
14
-
15
11
  function isAllowedScriptLoadingStrategyUsed(scriptLoadingStategey) {
16
12
  return allowedScriptLoadingStrategies.includes(scriptLoadingStategey);
17
13
  }
18
-
19
14
  function getScriptLoadingStrategyForStringType(scriptLoadingStategey) {
20
15
  if (isAllowedScriptLoadingStrategyUsed(scriptLoadingStategey)) {
21
16
  return scriptLoadingStategey;
22
17
  }
23
-
24
18
  return defaultScriptLoadingStrategy;
25
19
  }
26
-
27
20
  function getScriptLoadingStrategyForObject(scriptLoadingStategey) {
28
21
  if (Object.keys(scriptLoadingStategey).length === 0) {
29
22
  return defaultScriptLoadingStrategy;
30
23
  }
31
-
32
24
  const isAllowedScriptLoadingStrategy = Object.keys(scriptLoadingStategey).every(key => isAllowedScriptLoadingStrategyUsed(key));
33
-
34
25
  if (isAllowedScriptLoadingStrategy) {
35
26
  return Object.assign({}, scriptLoadingStategey);
36
27
  }
37
-
38
28
  console.warn('un supported script loading strategy used', scriptLoadingStategey);
39
29
  return defaultScriptLoadingStrategy;
40
30
  }
41
-
42
31
  function getScriptLoadingStrategy(scriptLoadingStategey) {
43
32
  if ((0, _utils.getTypeOf)(scriptLoadingStategey) === 'string') {
44
33
  return {
45
34
  [getScriptLoadingStrategyForStringType(scriptLoadingStategey)]: [/.*/]
46
35
  };
47
36
  }
48
-
49
37
  if ((0, _utils.getTypeOf)(scriptLoadingStategey) === 'object') {
50
38
  return getScriptLoadingStrategyForObject(scriptLoadingStategey);
51
39
  }
52
-
53
40
  return {
54
41
  [defaultScriptLoadingStrategy]: [/.*/]
55
42
  };
56
43
  }
57
-
58
44
  function configCustomScriptLoadingStrategyPlugin(options) {
59
45
  const {
60
46
  customScriptLoadingStrategey
61
47
  } = options;
62
-
63
48
  if (customScriptLoadingStrategey) {
64
49
  const currentScriptLoadingStrategy = getScriptLoadingStrategy(customScriptLoadingStrategey.options);
65
-
66
50
  if ((0, _utils.getTypeOf)(currentScriptLoadingStrategy) === 'object') {
67
51
  return new _CustomScriptLoadingPlugin.CustomScriptLoadingStrategyPlugin({
68
52
  scriptLoadingStategey: currentScriptLoadingStrategy
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configEFCTemplatePlugin = configEFCTemplatePlugin;
7
-
8
7
  var _nameTemplates = require("../common/nameTemplates");
9
-
10
8
  var _EFCTemplatePlugin = require("../custom_plugins/EFCTemplatePlugin");
11
-
12
9
  function configEFCTemplatePlugin(options) {
13
10
  const {
14
11
  publicPath
@@ -27,11 +24,9 @@ function configEFCTemplatePlugin(options) {
27
24
  version,
28
25
  templateFilePath
29
26
  } = options.efc;
30
-
31
27
  if (!hasEFC || !createSDkFile) {
32
28
  return false;
33
29
  }
34
-
35
30
  const i18nFileNameTemplate = (0, _nameTemplates.nameTemplates)('i18njs', options);
36
31
  return new _EFCTemplatePlugin.EFCTemplatePlugin({
37
32
  entryPointName,
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configEnvVariables = configEnvVariables;
7
-
8
7
  var _webpack = require("webpack");
9
-
10
8
  var _modeUtils = require("../common/modeUtils");
11
-
12
9
  function getDevEnvs(NODE_ENV) {
13
10
  return {
14
11
  __CLIENT__: true,
@@ -23,7 +20,6 @@ function getDevEnvs(NODE_ENV) {
23
20
  }
24
21
  };
25
22
  }
26
-
27
23
  function getProdEnvs(isDevelopment) {
28
24
  return {
29
25
  __CLIENT__: true,
@@ -37,7 +33,6 @@ function getProdEnvs(isDevelopment) {
37
33
  }
38
34
  };
39
35
  }
40
-
41
36
  function configEnvVariables(options) {
42
37
  // const mode = getWebpackMode(options);
43
38
  const {
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configHtmlWebpackPlugin = configHtmlWebpackPlugin;
7
-
8
7
  var _constants = require("../../../constants");
9
-
10
8
  var _nameTemplates = require("../common/nameTemplates");
11
-
12
9
  var _modeUtils = require("../common/modeUtils");
13
-
14
10
  var _InitialHtmlPlugin = require("../custom_plugins/InitialHtmlPlugin");
15
-
16
11
  function configHtmlWebpackPlugin(options) {
17
12
  const {
18
13
  htmlTemplate,
@@ -23,7 +18,8 @@ function configHtmlWebpackPlugin(options) {
23
18
  templateFile
24
19
  } = htmlTemplate;
25
20
  const appInitialHTMLTemplatePath = (0, _constants.joinWithAppPath)(templateFile);
26
- const minifyHtmlOptions = (0, _modeUtils.isProductionMode)(mode) ? // eslint-disable-next-line no-use-before-define
21
+ const minifyHtmlOptions = (0, _modeUtils.isProductionMode)(mode) ?
22
+ // eslint-disable-next-line no-use-before-define
27
23
  getHTMLMinifyOptions(htmlTemplate) : false;
28
24
  return new _InitialHtmlPlugin.InitialHtmlPlugin({
29
25
  mainChunkName: 'main',
@@ -34,7 +30,6 @@ function configHtmlWebpackPlugin(options) {
34
30
  scriptLoading: 'defer'
35
31
  });
36
32
  }
37
-
38
33
  const defaultHTMLMiniFyOption = {
39
34
  collapseWhitespace: true,
40
35
  minifyCSS: true,
@@ -46,7 +41,6 @@ const defaultHTMLMiniFyOption = {
46
41
  removeStyleLinkTypeAttributes: true,
47
42
  useShortDoctype: true
48
43
  };
49
-
50
44
  function getHTMLMinifyOptions(htmlTemplate) {
51
45
  const {
52
46
  minify
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = configI18nIndexingPlugin;
7
+ var _I18nNumericIndexPlugin = _interopRequireDefault(require("../custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin"));
8
+ var _resourceBasedPublicPath = require("../common/resourceBasedPublicPath");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ function configI18nIndexingPlugin(config) {
11
+ const {
12
+ i18nIndexing,
13
+ cdnMapping
14
+ } = config;
15
+ if (!i18nIndexing || !i18nIndexing.enable) {
16
+ return null;
17
+ }
18
+
19
+ // Get the public path for i18n resources
20
+ const i18nPublicPath = (0, _resourceBasedPublicPath.resourceBasedPublicPath)('i18n', config);
21
+
22
+ // Get the CDN template for i18n resources if CDN is enabled
23
+ const i18nCdnTemplate = cdnMapping && cdnMapping.isCdnEnabled ? cdnMapping.i18nTemplate || cdnMapping.jsTemplate : '';
24
+ const options = {
25
+ jsResourcePath: i18nIndexing.jsResourcePath,
26
+ propertiesFolderPath: i18nIndexing.propertiesFolderPath,
27
+ numericMapPath: i18nIndexing.numericMapPath,
28
+ numericFilenameTemplate: i18nIndexing.numericFilenameTemplate || 'i18n-chunk/[locale]/numeric.i18n.js',
29
+ dynamicFilenameTemplate: i18nIndexing.dynamicFilenameTemplate || 'i18n-chunk/[locale]/dynamic.i18n.js',
30
+ jsonpFunc: i18nIndexing.jsonpFunc || 'window.loadI18nChunk',
31
+ htmlTemplateLabel: i18nIndexing.htmlTemplateLabel || '{{--user-locale}}',
32
+ localeVarName: i18nIndexing.localeVarName || 'window.userLangCode',
33
+ customGroups: i18nIndexing.customGroups || {},
34
+ publicPath: i18nPublicPath || '',
35
+ i18nCdnTemplate
36
+ };
37
+ return new _I18nNumericIndexPlugin.default(options);
38
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = configI18nNumericHtmlInjector;
7
+ var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const pluginName = 'I18nNumericHtmlInjectorPlugin';
10
+ class I18nNumericHtmlInjectorPlugin {
11
+ constructor(options) {
12
+ this.options = options;
13
+ }
14
+ apply(compiler) {
15
+ compiler.hooks.thisCompilation.tap(pluginName, compilation => {
16
+ // Hook into HtmlWebpackPlugin to inject i18n script tags
17
+ _htmlWebpackPlugin.default.getHooks(compilation).beforeAssetTagGeneration.tap(pluginName, hookData => {
18
+ const {
19
+ assets
20
+ } = hookData;
21
+ const {
22
+ numericFilenameTemplate,
23
+ dynamicFilenameTemplate,
24
+ htmlTemplateLabel,
25
+ i18nCdnTemplate,
26
+ customGroups
27
+ } = this.options;
28
+ const newI18nAssets = [];
29
+
30
+ // Add numeric i18n chunk
31
+ if (numericFilenameTemplate) {
32
+ const numericFilename = numericFilenameTemplate.replace(/\[locale\]/g, htmlTemplateLabel).replace(/%5Blocale%5D/g, htmlTemplateLabel);
33
+ // Don't add CDN template - HtmlWebpackPlugin handles it
34
+ newI18nAssets.push(numericFilename);
35
+ }
36
+
37
+ // Add dynamic i18n chunk
38
+ if (dynamicFilenameTemplate) {
39
+ const dynamicFilename = dynamicFilenameTemplate.replace(/\[locale\]/g, htmlTemplateLabel).replace(/%5Blocale%5D/g, htmlTemplateLabel);
40
+ // Don't add CDN template - HtmlWebpackPlugin handles it
41
+ newI18nAssets.push(dynamicFilename);
42
+ }
43
+
44
+ // Add custom group chunks if they should be in initial HTML
45
+ if (customGroups) {
46
+ Object.entries(customGroups).forEach(([groupName, groupConfig]) => {
47
+ // Only add to initial HTML if preload is true
48
+ if (groupConfig.preload && groupConfig.filenameTemplate) {
49
+ const groupFilename = groupConfig.filenameTemplate.replace(/\[locale\]/g, htmlTemplateLabel).replace(/%5Blocale%5D/g, htmlTemplateLabel);
50
+ // Don't add CDN template - HtmlWebpackPlugin handles it
51
+ newI18nAssets.push(groupFilename);
52
+ }
53
+ });
54
+ }
55
+
56
+ // Prepend i18n assets to ensure they load before main bundle
57
+ if (newI18nAssets.length > 0) {
58
+ assets.js = [...newI18nAssets, ...assets.js];
59
+ }
60
+ return hookData;
61
+ });
62
+ });
63
+ }
64
+ }
65
+ function configI18nNumericHtmlInjector(config) {
66
+ const {
67
+ i18nIndexing,
68
+ cdnMapping
69
+ } = config;
70
+
71
+ // Only create this plugin if i18nIndexing is enabled
72
+ if (!i18nIndexing || !i18nIndexing.enable) {
73
+ return null;
74
+ }
75
+
76
+ // Get the CDN template for i18n resources if CDN is enabled
77
+ const i18nCdnTemplate = cdnMapping && cdnMapping.isCdnEnabled ? cdnMapping.i18nTemplate || cdnMapping.jsTemplate : '';
78
+ const options = {
79
+ numericFilenameTemplate: i18nIndexing.numericFilenameTemplate || 'i18n-chunk/[locale]/numeric.i18n.js',
80
+ dynamicFilenameTemplate: i18nIndexing.dynamicFilenameTemplate || 'i18n-chunk/[locale]/dynamic.i18n.js',
81
+ htmlTemplateLabel: i18nIndexing.htmlTemplateLabel || '{{--user-locale}}',
82
+ customGroups: i18nIndexing.customGroups || {},
83
+ i18nCdnTemplate
84
+ };
85
+ return new I18nNumericHtmlInjectorPlugin(options);
86
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.configI18nNumericIndexPlugin = configI18nNumericIndexPlugin;
7
+ var _I18nNumericIndexPlugin = _interopRequireDefault(require("../custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexPlugin"));
8
+ var _I18nNumericIndexHtmlInjectorPlugin = require("../custom_plugins/I18nNumericIndexPlugin/I18nNumericIndexHtmlInjectorPlugin");
9
+ var _readI18nValues = require("../custom_plugins/I18nSplitPlugin/readI18nValues");
10
+ var _path = _interopRequireDefault(require("path"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function configI18nNumericIndexPlugin(options) {
13
+ if (!(options.i18nIndexing && options.i18nIndexing.enable)) {
14
+ return null;
15
+ }
16
+ const i18nOpts = options.i18nIndexing;
17
+ const isDevelopment = options.isDevelopment || false; // Get isDevelopment from options
18
+
19
+ // Validate required options
20
+ const requiredOptions = ['jsResourcePath', 'propertiesFolderPath', 'numericMapPath', 'jsonpFunc', 'htmlTemplateLabel', 'localeVarName'];
21
+ const missingOptions = requiredOptions.filter(opt => !i18nOpts[opt]);
22
+ if (missingOptions.length > 0) {
23
+ console.warn(`[I18nNumericIndexPlugin] Missing required options: ${missingOptions.join(', ')}`);
24
+ return null;
25
+ }
26
+
27
+ // Read i18n values
28
+ const {
29
+ locales,
30
+ allI18nObject
31
+ } = (0, _readI18nValues.readI18nValues)({
32
+ jsResource: i18nOpts.jsResourcePath,
33
+ propertiesFolder: i18nOpts.propertiesFolderPath,
34
+ disableDefault: false
35
+ });
36
+
37
+ // Ensure templates have [locale] placeholder
38
+ const numericTemplate = i18nOpts.numericFilenameTemplate || '[locale]/numeric.i18n.js';
39
+ const dynamicTemplate = i18nOpts.dynamicFilenameTemplate || '[locale]/dynamic.i18n.js';
40
+ if (!numericTemplate.includes('[locale]')) {
41
+ console.warn('[I18nNumericIndexPlugin] numericFilenameTemplate must include [locale] placeholder');
42
+ return null;
43
+ }
44
+ if (!dynamicTemplate.includes('[locale]')) {
45
+ console.warn('[I18nNumericIndexPlugin] dynamicFilenameTemplate must include [locale] placeholder');
46
+ return null;
47
+ }
48
+
49
+ // Resolve singleFileTemplate if it's a function
50
+ let resolvedSingleFileTemplate = i18nOpts.singleFileTemplate || '[locale].js';
51
+ if (typeof i18nOpts.singleFileTemplate === 'function') {
52
+ resolvedSingleFileTemplate = i18nOpts.singleFileTemplate(isDevelopment);
53
+ }
54
+
55
+ // Plugin options
56
+ const numericIndexPluginOptions = {
57
+ enable: i18nOpts.enable,
58
+ outputFolder: i18nOpts.outputFolder || 'i18n-chunk',
59
+ jsResourcePath: i18nOpts.jsResourcePath,
60
+ propertiesFolderPath: i18nOpts.propertiesFolderPath,
61
+ numericMapPath: i18nOpts.numericMapPath,
62
+ locales,
63
+ allI18nObject,
64
+ numericFilenameTemplate: numericTemplate,
65
+ dynamicFilenameTemplate: dynamicTemplate,
66
+ singleFileTemplate: resolvedSingleFileTemplate,
67
+ jsonpFunc: i18nOpts.jsonpFunc,
68
+ localeVarName: i18nOpts.localeVarName,
69
+ singleFile: i18nOpts.singleFile || false,
70
+ includeContentHash: i18nOpts.includeContentHash || false,
71
+ generateManifest: i18nOpts.generateManifest || false,
72
+ manifestPath: i18nOpts.manifestPath || null,
73
+ customGroups: i18nOpts.customGroups || null,
74
+ isDevelopment: isDevelopment // Pass through for reference
75
+ };
76
+
77
+ // HTML injector options
78
+ const htmlInjectorOptions = {
79
+ outputFolder: i18nOpts.outputFolder || 'i18n-chunk',
80
+ numericFilenameTemplate: numericTemplate,
81
+ dynamicFilenameTemplate: dynamicTemplate,
82
+ singleFileTemplate: resolvedSingleFileTemplate,
83
+ htmlTemplateLabel: i18nOpts.htmlTemplateLabel,
84
+ singleFile: i18nOpts.singleFile || false,
85
+ i18nAssetsPublicPathPrefix: '',
86
+ // HtmlWebpackPlugin handles publicPath
87
+ isDevelopment: isDevelopment
88
+ };
89
+ const i18nNumericPluginInstance = new _I18nNumericIndexPlugin.default(numericIndexPluginOptions);
90
+ const htmlInjectorPluginInstance = new _I18nNumericIndexHtmlInjectorPlugin.I18nNumericIndexHtmlInjectorPlugin(htmlInjectorOptions);
91
+ return [i18nNumericPluginInstance, htmlInjectorPluginInstance];
92
+ }
@@ -4,25 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configI18nSplitPlugin = configI18nSplitPlugin;
7
-
8
7
  var _nameTemplates = require("../common/nameTemplates");
9
-
10
8
  var _I18nSplitPlugin = _interopRequireDefault(require("../custom_plugins/I18nSplitPlugin"));
11
-
12
9
  var _resourceBasedPublicPath = require("../common/resourceBasedPublicPath");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
11
  function configI18nSplitPlugin(options) {
17
12
  const {
18
13
  i18nChunkSplit
19
14
  } = options;
20
-
21
15
  if (!i18nChunkSplit.chunkSplitEnable) {
22
16
  return null;
23
17
  }
24
-
25
- const i18nPublicPath = (0, _resourceBasedPublicPath.resourceBasedPublicPath)('i18n', options); // const i18nPublicPathAsExpression = publicPathAsExpression('i18n', options);
18
+ const i18nPublicPath = (0, _resourceBasedPublicPath.resourceBasedPublicPath)('i18n', options);
19
+ // const i18nPublicPathAsExpression = publicPathAsExpression('i18n', options);
26
20
 
27
21
  return new _I18nSplitPlugin.default({
28
22
  mainChunkName: 'main',
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configIgnorePlugin = configIgnorePlugin;
7
-
8
7
  var _webpack = require("webpack");
9
-
10
8
  // eslint-disable-next-line no-unused-vars
11
9
  function configIgnorePlugin(options) {
12
10
  return new _webpack.IgnorePlugin({
@@ -4,26 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configManifestJsonPlugin = configManifestJsonPlugin;
7
-
8
7
  var _ManifestJsonPlugin = require("../custom_plugins/ManifestJsonPlugin");
9
-
10
8
  function configManifestJsonPlugin(options) {
11
9
  const {
12
10
  enable,
13
11
  i18nManifestJson,
14
12
  licenseManifest
15
13
  } = options.manifestJson;
16
-
17
14
  if (!enable) {
18
15
  return null;
19
16
  }
20
-
21
17
  const params = [{
22
18
  outputJsonFileName: 'manifest.json',
23
19
  test: f => !/\.i18n\.js$|\.LICENSE\.txt$|\.map$/.test(f),
24
20
  needInitialEntries: true
25
21
  }];
26
-
27
22
  if (i18nManifestJson) {
28
23
  params.push({
29
24
  outputJsonFileName: 'i18nManifest.json',
@@ -31,7 +26,6 @@ function configManifestJsonPlugin(options) {
31
26
  needInitialEntries: false
32
27
  });
33
28
  }
34
-
35
29
  if (licenseManifest) {
36
30
  params.push({
37
31
  outputJsonFileName: 'licenseManifest.json',
@@ -39,6 +33,5 @@ function configManifestJsonPlugin(options) {
39
33
  needInitialEntries: false
40
34
  });
41
35
  }
42
-
43
36
  return new _ManifestJsonPlugin.AddFileToManifestJson(params);
44
37
  }
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configMiniCSSExtractPlugin = configMiniCSSExtractPlugin;
7
-
8
7
  var _miniCssExtractPlugin = _interopRequireDefault(require("mini-css-extract-plugin"));
9
-
10
8
  var _nameTemplates = require("../common/nameTemplates");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
10
  function configMiniCSSExtractPlugin(options) {
15
11
  const {
16
12
  enableRTLSplit
17
13
  } = options.css.plugins.rtlSplit;
18
- const cssLTRFileNameTempalte = enableRTLSplit ? (0, _nameTemplates.nameTemplates)('cssdir', options) : (0, _nameTemplates.nameTemplates)('css', options); // eslint-disable-next-line no-undef
19
-
14
+ const cssLTRFileNameTempalte = enableRTLSplit ? (0, _nameTemplates.nameTemplates)('cssdir', options) : (0, _nameTemplates.nameTemplates)('css', options);
15
+ // eslint-disable-next-line no-undef
20
16
  return new _miniCssExtractPlugin.default({
21
17
  filename: cssLTRFileNameTempalte,
22
18
  chunkFilename: cssLTRFileNameTempalte
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configProgressPlugin = configProgressPlugin;
7
-
8
7
  var _webpack = _interopRequireDefault(require("webpack"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
9
  // eslint-disable-next-line no-unused-vars
13
10
  function configProgressPlugin(options) {
14
11
  if (!options.printProgress) {
15
12
  return null;
16
13
  }
17
-
18
14
  return new _webpack.default.ProgressPlugin({
19
15
  handler: (percentage, message, ...args) => {
20
16
  // eslint-disable-next-line no-console
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configResourceHintsPlugin = configResourceHintsPlugin;
7
-
8
7
  var _ResourceHintsPlugin = _interopRequireDefault(require("../custom_plugins/ResourceHintsPlugin"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
9
  function configResourceHintsPlugin(options) {
13
10
  const {
14
11
  publicPath,
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.configRtlCssPlugin = configRtlCssPlugin;
7
-
8
7
  var _RtlCssPlugin = require("../custom_plugins/RtlSplitPlugin/RtlCssPlugin");
9
-
10
8
  function configRtlCssPlugin(options) {
11
9
  const {
12
10
  enableRTLSplit,
@@ -14,11 +12,9 @@ function configRtlCssPlugin(options) {
14
12
  disableMinifySelector,
15
13
  dirVarName
16
14
  } = options.css.plugins.rtlSplit;
17
-
18
15
  if (!enableRTLSplit) {
19
16
  return null;
20
17
  }
21
-
22
18
  return new _RtlCssPlugin.RtlCssPlugin({
23
19
  templateLabel,
24
20
  disableMinifySelector,