@tramvai/cli 2.119.4 → 2.120.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.
@@ -112,6 +112,7 @@ export declare const CLIENT_CONFIG_MANAGER_TOKEN: {
112
112
  shared: {
113
113
  defaultTramvaiDependencies?: boolean;
114
114
  flexibleTramvaiVersions: boolean;
115
+ criticalChunks: string[];
115
116
  deps: (string | {
116
117
  name: string;
117
118
  singleton: boolean;
@@ -235,6 +236,7 @@ export declare const CLIENT_MODERN_CONFIG_MANAGER_TOKEN: {
235
236
  shared: {
236
237
  defaultTramvaiDependencies?: boolean;
237
238
  flexibleTramvaiVersions: boolean;
239
+ criticalChunks: string[];
238
240
  deps: (string | {
239
241
  name: string;
240
242
  singleton: boolean;
@@ -358,6 +360,7 @@ export declare const SERVER_CONFIG_MANAGER_TOKEN: {
358
360
  shared: {
359
361
  defaultTramvaiDependencies?: boolean;
360
362
  flexibleTramvaiVersions: boolean;
363
+ criticalChunks: string[];
361
364
  deps: (string | {
362
365
  name: string;
363
366
  singleton: boolean;
@@ -122,6 +122,7 @@ export declare const CONFIG_MANAGER_TOKEN: {
122
122
  shared: {
123
123
  defaultTramvaiDependencies?: boolean;
124
124
  flexibleTramvaiVersions: boolean;
125
+ criticalChunks: string[];
125
126
  deps: (string | {
126
127
  name: string;
127
128
  singleton: boolean;
@@ -4,11 +4,14 @@ exports.configToEnv = void 0;
4
4
  const validate_1 = require("../../../config/validate");
5
5
  const shouldUseReactRoot_1 = require("../../../utils/shouldUseReactRoot");
6
6
  const configToEnv = (configManager) => (config) => {
7
- const { fileSystemPages } = (0, validate_1.isApplication)(configManager)
7
+ const { fileSystemPages, shared } = (0, validate_1.isApplication)(configManager)
8
8
  ? configManager
9
- : { fileSystemPages: { enabled: false, routesDir: false, pagesDir: false } };
9
+ : {
10
+ fileSystemPages: { enabled: false, routesDir: false, pagesDir: false },
11
+ shared: { criticalChunks: [] },
12
+ };
10
13
  config.plugin('define').tap((args) => [
11
- Object.assign(Object.assign({}, args[0]), { 'process.env.__TRAMVAI_EXPERIMENTAL_ENABLE_FILE_SYSTEM_PAGES': JSON.stringify(fileSystemPages.enabled), 'process.env.__TRAMVAI_EXPERIMENTAL_FILE_SYSTEM_ROUTES_DIR': JSON.stringify(fileSystemPages.routesDir), 'process.env.__TRAMVAI_EXPERIMENTAL_FILE_SYSTEM_PAGES_DIR': JSON.stringify(fileSystemPages.pagesDir), 'process.env.__TRAMVAI_CONCURRENT_FEATURES': JSON.stringify((0, shouldUseReactRoot_1.shouldUseReactRoot)()) }),
14
+ Object.assign(Object.assign({}, args[0]), { 'process.env.__TRAMVAI_EXPERIMENTAL_ENABLE_FILE_SYSTEM_PAGES': JSON.stringify(fileSystemPages.enabled), 'process.env.__TRAMVAI_EXPERIMENTAL_FILE_SYSTEM_ROUTES_DIR': JSON.stringify(fileSystemPages.routesDir), 'process.env.__TRAMVAI_EXPERIMENTAL_FILE_SYSTEM_PAGES_DIR': JSON.stringify(fileSystemPages.pagesDir), 'process.env.__TRAMVAI_CONCURRENT_FEATURES': JSON.stringify((0, shouldUseReactRoot_1.shouldUseReactRoot)()), 'process.env.__TRAMVAI_CRITICAL_CHUNKS': `'${JSON.stringify(shared.criticalChunks)}'` }),
12
15
  ]);
13
16
  };
14
17
  exports.configToEnv = configToEnv;
@@ -1 +1 @@
1
- {"version":3,"file":"configToEnv.js","sourceRoot":"","sources":["../../../../src/library/webpack/blocks/configToEnv.ts"],"names":[],"mappings":";;;AAEA,uDAAyD;AAEzD,0EAAuE;AAEhE,MAAM,WAAW,GAAG,CAAC,aAAyC,EAAE,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE;IAC3F,MAAM,EAAE,eAAe,EAAE,GAAG,IAAA,wBAAa,EAAC,aAAa,CAAC;QACtD,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,EAAE,eAAe,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;IAE/E,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;wCAE/B,IAAI,CAAC,CAAC,CAAC,KACV,6DAA6D,EAAE,IAAI,CAAC,SAAS,CAC3E,eAAe,CAAC,OAAO,CACxB,EACD,2DAA2D,EAAE,IAAI,CAAC,SAAS,CACzE,eAAe,CAAC,SAAS,CAC1B,EACD,0DAA0D,EAAE,IAAI,CAAC,SAAS,CACxE,eAAe,CAAC,QAAQ,CACzB,EACD,2CAA2C,EAAE,IAAI,CAAC,SAAS,CAAC,IAAA,uCAAkB,GAAE,CAAC;KAEpF,CAAC,CAAC;AACL,CAAC,CAAC;AApBW,QAAA,WAAW,eAoBtB"}
1
+ {"version":3,"file":"configToEnv.js","sourceRoot":"","sources":["../../../../src/library/webpack/blocks/configToEnv.ts"],"names":[],"mappings":";;;AAEA,uDAAyD;AAEzD,0EAAuE;AAEhE,MAAM,WAAW,GAAG,CAAC,aAAyC,EAAE,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE;IAC3F,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,IAAA,wBAAa,EAAC,aAAa,CAAC;QAC9D,CAAC,CAAC,aAAa;QACf,CAAC,CAAC;YACE,eAAe,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;YACtE,MAAM,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE;SAC/B,CAAC;IAEN,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;wCAE/B,IAAI,CAAC,CAAC,CAAC,KACV,6DAA6D,EAAE,IAAI,CAAC,SAAS,CAC3E,eAAe,CAAC,OAAO,CACxB,EACD,2DAA2D,EAAE,IAAI,CAAC,SAAS,CACzE,eAAe,CAAC,SAAS,CAC1B,EACD,0DAA0D,EAAE,IAAI,CAAC,SAAS,CACxE,eAAe,CAAC,QAAQ,CACzB,EACD,2CAA2C,EAAE,IAAI,CAAC,SAAS,CAAC,IAAA,uCAAkB,GAAE,CAAC,EACjF,uCAAuC,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG;KAExF,CAAC,CAAC;AACL,CAAC,CAAC;AAxBW,QAAA,WAAW,eAwBtB"}
@@ -1122,23 +1122,23 @@
1122
1122
  "dotAll": {
1123
1123
  "type": "boolean"
1124
1124
  },
1125
- "__@match@8167": {
1125
+ "__@match@8168": {
1126
1126
  "type": "object",
1127
1127
  "additionalProperties": false
1128
1128
  },
1129
- "__@replace@8169": {
1129
+ "__@replace@8170": {
1130
1130
  "type": "object",
1131
1131
  "additionalProperties": false
1132
1132
  },
1133
- "__@search@8172": {
1133
+ "__@search@8173": {
1134
1134
  "type": "object",
1135
1135
  "additionalProperties": false
1136
1136
  },
1137
- "__@split@8174": {
1137
+ "__@split@8175": {
1138
1138
  "type": "object",
1139
1139
  "additionalProperties": false
1140
1140
  },
1141
- "__@matchAll@8176": {
1141
+ "__@matchAll@8177": {
1142
1142
  "type": "object",
1143
1143
  "additionalProperties": false
1144
1144
  }
@@ -1344,6 +1344,15 @@
1344
1344
  "default": true,
1345
1345
  "type": "boolean"
1346
1346
  },
1347
+ "criticalChunks": {
1348
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
1349
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
1350
+ "default": [],
1351
+ "type": "array",
1352
+ "items": {
1353
+ "type": "string"
1354
+ }
1355
+ },
1347
1356
  "deps": {
1348
1357
  "title": "list of the dependencies that will be shared",
1349
1358
  "default": [],
@@ -1755,23 +1764,23 @@
1755
1764
  "dotAll": {
1756
1765
  "type": "boolean"
1757
1766
  },
1758
- "__@match@8167": {
1767
+ "__@match@8168": {
1759
1768
  "type": "object",
1760
1769
  "additionalProperties": false
1761
1770
  },
1762
- "__@replace@8169": {
1771
+ "__@replace@8170": {
1763
1772
  "type": "object",
1764
1773
  "additionalProperties": false
1765
1774
  },
1766
- "__@search@8172": {
1775
+ "__@search@8173": {
1767
1776
  "type": "object",
1768
1777
  "additionalProperties": false
1769
1778
  },
1770
- "__@split@8174": {
1779
+ "__@split@8175": {
1771
1780
  "type": "object",
1772
1781
  "additionalProperties": false
1773
1782
  },
1774
- "__@matchAll@8176": {
1783
+ "__@matchAll@8177": {
1775
1784
  "type": "object",
1776
1785
  "additionalProperties": false
1777
1786
  }
@@ -1977,6 +1986,15 @@
1977
1986
  "default": true,
1978
1987
  "type": "boolean"
1979
1988
  },
1989
+ "criticalChunks": {
1990
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
1991
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
1992
+ "default": [],
1993
+ "type": "array",
1994
+ "items": {
1995
+ "type": "string"
1996
+ }
1997
+ },
1980
1998
  "deps": {
1981
1999
  "title": "list of the dependencies that will be shared",
1982
2000
  "default": [],
@@ -2388,23 +2406,23 @@
2388
2406
  "dotAll": {
2389
2407
  "type": "boolean"
2390
2408
  },
2391
- "__@match@8167": {
2409
+ "__@match@8168": {
2392
2410
  "type": "object",
2393
2411
  "additionalProperties": false
2394
2412
  },
2395
- "__@replace@8169": {
2413
+ "__@replace@8170": {
2396
2414
  "type": "object",
2397
2415
  "additionalProperties": false
2398
2416
  },
2399
- "__@search@8172": {
2417
+ "__@search@8173": {
2400
2418
  "type": "object",
2401
2419
  "additionalProperties": false
2402
2420
  },
2403
- "__@split@8174": {
2421
+ "__@split@8175": {
2404
2422
  "type": "object",
2405
2423
  "additionalProperties": false
2406
2424
  },
2407
- "__@matchAll@8176": {
2425
+ "__@matchAll@8177": {
2408
2426
  "type": "object",
2409
2427
  "additionalProperties": false
2410
2428
  }
@@ -2610,6 +2628,15 @@
2610
2628
  "default": true,
2611
2629
  "type": "boolean"
2612
2630
  },
2631
+ "criticalChunks": {
2632
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
2633
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
2634
+ "default": [],
2635
+ "type": "array",
2636
+ "items": {
2637
+ "type": "string"
2638
+ }
2639
+ },
2613
2640
  "deps": {
2614
2641
  "title": "list of the dependencies that will be shared",
2615
2642
  "default": [],
@@ -284,6 +284,13 @@ export interface CliConfigEntry extends ConfigEntry {
284
284
  * @default true
285
285
  */
286
286
  flexibleTramvaiVersions: boolean;
287
+ /**
288
+ * @title add chunks to preload as critical in-parallel with "platform.js"
289
+ * @description this option is useful when you need to create async boundary for app dependencies.
290
+ * More info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption
291
+ * @default []
292
+ */
293
+ criticalChunks: string[];
287
294
  /**
288
295
  * @title list of the dependencies that will be shared
289
296
  * @default []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/cli",
3
- "version": "2.119.4",
3
+ "version": "2.120.0",
4
4
  "description": "Cli инструмент для сборки и запуска приложений",
5
5
  "files": [
6
6
  "src",
@@ -71,7 +71,7 @@
71
71
  "@tinkoff/utils": "^2.1.3",
72
72
  "@tinkoff/webpack-dedupe-plugin": "1.0.5",
73
73
  "@tramvai/build": "3.1.3",
74
- "@tramvai/react": "2.119.4",
74
+ "@tramvai/react": "2.120.0",
75
75
  "@tramvai/tools-check-versions": "0.4.14",
76
76
  "@tramvai/tools-migrate": "0.6.18",
77
77
  "ajv": "^6.12.6",
package/schema.json CHANGED
@@ -1143,23 +1143,23 @@
1143
1143
  "dotAll": {
1144
1144
  "type": "boolean"
1145
1145
  },
1146
- "__@match@8167": {
1146
+ "__@match@8168": {
1147
1147
  "type": "object",
1148
1148
  "additionalProperties": false
1149
1149
  },
1150
- "__@replace@8169": {
1150
+ "__@replace@8170": {
1151
1151
  "type": "object",
1152
1152
  "additionalProperties": false
1153
1153
  },
1154
- "__@search@8172": {
1154
+ "__@search@8173": {
1155
1155
  "type": "object",
1156
1156
  "additionalProperties": false
1157
1157
  },
1158
- "__@split@8174": {
1158
+ "__@split@8175": {
1159
1159
  "type": "object",
1160
1160
  "additionalProperties": false
1161
1161
  },
1162
- "__@matchAll@8176": {
1162
+ "__@matchAll@8177": {
1163
1163
  "type": "object",
1164
1164
  "additionalProperties": false
1165
1165
  }
@@ -1365,6 +1365,15 @@
1365
1365
  "default": true,
1366
1366
  "type": "boolean"
1367
1367
  },
1368
+ "criticalChunks": {
1369
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
1370
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
1371
+ "default": [],
1372
+ "type": "array",
1373
+ "items": {
1374
+ "type": "string"
1375
+ }
1376
+ },
1368
1377
  "deps": {
1369
1378
  "title": "list of the dependencies that will be shared",
1370
1379
  "default": [],
@@ -1784,23 +1793,23 @@
1784
1793
  "dotAll": {
1785
1794
  "type": "boolean"
1786
1795
  },
1787
- "__@match@8167": {
1796
+ "__@match@8168": {
1788
1797
  "type": "object",
1789
1798
  "additionalProperties": false
1790
1799
  },
1791
- "__@replace@8169": {
1800
+ "__@replace@8170": {
1792
1801
  "type": "object",
1793
1802
  "additionalProperties": false
1794
1803
  },
1795
- "__@search@8172": {
1804
+ "__@search@8173": {
1796
1805
  "type": "object",
1797
1806
  "additionalProperties": false
1798
1807
  },
1799
- "__@split@8174": {
1808
+ "__@split@8175": {
1800
1809
  "type": "object",
1801
1810
  "additionalProperties": false
1802
1811
  },
1803
- "__@matchAll@8176": {
1812
+ "__@matchAll@8177": {
1804
1813
  "type": "object",
1805
1814
  "additionalProperties": false
1806
1815
  }
@@ -2006,6 +2015,15 @@
2006
2015
  "default": true,
2007
2016
  "type": "boolean"
2008
2017
  },
2018
+ "criticalChunks": {
2019
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
2020
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
2021
+ "default": [],
2022
+ "type": "array",
2023
+ "items": {
2024
+ "type": "string"
2025
+ }
2026
+ },
2009
2027
  "deps": {
2010
2028
  "title": "list of the dependencies that will be shared",
2011
2029
  "default": [],
@@ -2425,23 +2443,23 @@
2425
2443
  "dotAll": {
2426
2444
  "type": "boolean"
2427
2445
  },
2428
- "__@match@8167": {
2446
+ "__@match@8168": {
2429
2447
  "type": "object",
2430
2448
  "additionalProperties": false
2431
2449
  },
2432
- "__@replace@8169": {
2450
+ "__@replace@8170": {
2433
2451
  "type": "object",
2434
2452
  "additionalProperties": false
2435
2453
  },
2436
- "__@search@8172": {
2454
+ "__@search@8173": {
2437
2455
  "type": "object",
2438
2456
  "additionalProperties": false
2439
2457
  },
2440
- "__@split@8174": {
2458
+ "__@split@8175": {
2441
2459
  "type": "object",
2442
2460
  "additionalProperties": false
2443
2461
  },
2444
- "__@matchAll@8176": {
2462
+ "__@matchAll@8177": {
2445
2463
  "type": "object",
2446
2464
  "additionalProperties": false
2447
2465
  }
@@ -2647,6 +2665,15 @@
2647
2665
  "default": true,
2648
2666
  "type": "boolean"
2649
2667
  },
2668
+ "criticalChunks": {
2669
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
2670
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
2671
+ "default": [],
2672
+ "type": "array",
2673
+ "items": {
2674
+ "type": "string"
2675
+ }
2676
+ },
2650
2677
  "deps": {
2651
2678
  "title": "list of the dependencies that will be shared",
2652
2679
  "default": [],
@@ -5,9 +5,12 @@ import type { ConfigEntry } from '../../../typings/configEntry/common';
5
5
  import { shouldUseReactRoot } from '../../../utils/shouldUseReactRoot';
6
6
 
7
7
  export const configToEnv = (configManager: ConfigManager<ConfigEntry>) => (config: Config) => {
8
- const { fileSystemPages } = isApplication(configManager)
8
+ const { fileSystemPages, shared } = isApplication(configManager)
9
9
  ? configManager
10
- : { fileSystemPages: { enabled: false, routesDir: false, pagesDir: false } };
10
+ : {
11
+ fileSystemPages: { enabled: false, routesDir: false, pagesDir: false },
12
+ shared: { criticalChunks: [] },
13
+ };
11
14
 
12
15
  config.plugin('define').tap((args) => [
13
16
  {
@@ -22,6 +25,7 @@ export const configToEnv = (configManager: ConfigManager<ConfigEntry>) => (confi
22
25
  fileSystemPages.pagesDir
23
26
  ),
24
27
  'process.env.__TRAMVAI_CONCURRENT_FEATURES': JSON.stringify(shouldUseReactRoot()),
28
+ 'process.env.__TRAMVAI_CRITICAL_CHUNKS': `'${JSON.stringify(shared.criticalChunks)}'`,
25
29
  },
26
30
  ]);
27
31
  };
@@ -102,6 +102,7 @@ it('should populate defaults for config', () => {
102
102
  "root": "src",
103
103
  "serverApiDir": "src/api",
104
104
  "shared": {
105
+ "criticalChunks": [],
105
106
  "deps": [],
106
107
  "flexibleTramvaiVersions": true,
107
108
  },
@@ -159,6 +160,7 @@ it('should populate defaults for config', () => {
159
160
  },
160
161
  "root": "packages/child-app",
161
162
  "shared": {
163
+ "criticalChunks": [],
162
164
  "deps": [],
163
165
  "flexibleTramvaiVersions": true,
164
166
  },
@@ -337,6 +339,7 @@ it('should populate defaults for overridable options', () => {
337
339
  "root": "src",
338
340
  "serverApiDir": "src/api",
339
341
  "shared": {
342
+ "criticalChunks": [],
340
343
  "deps": [],
341
344
  "flexibleTramvaiVersions": true,
342
345
  },
@@ -408,6 +411,7 @@ it('should populate defaults for overridable options', () => {
408
411
  },
409
412
  "root": "packages/child-app",
410
413
  "shared": {
414
+ "criticalChunks": [],
411
415
  "deps": [],
412
416
  "flexibleTramvaiVersions": true,
413
417
  },
@@ -1122,23 +1122,23 @@
1122
1122
  "dotAll": {
1123
1123
  "type": "boolean"
1124
1124
  },
1125
- "__@match@8167": {
1125
+ "__@match@8168": {
1126
1126
  "type": "object",
1127
1127
  "additionalProperties": false
1128
1128
  },
1129
- "__@replace@8169": {
1129
+ "__@replace@8170": {
1130
1130
  "type": "object",
1131
1131
  "additionalProperties": false
1132
1132
  },
1133
- "__@search@8172": {
1133
+ "__@search@8173": {
1134
1134
  "type": "object",
1135
1135
  "additionalProperties": false
1136
1136
  },
1137
- "__@split@8174": {
1137
+ "__@split@8175": {
1138
1138
  "type": "object",
1139
1139
  "additionalProperties": false
1140
1140
  },
1141
- "__@matchAll@8176": {
1141
+ "__@matchAll@8177": {
1142
1142
  "type": "object",
1143
1143
  "additionalProperties": false
1144
1144
  }
@@ -1344,6 +1344,15 @@
1344
1344
  "default": true,
1345
1345
  "type": "boolean"
1346
1346
  },
1347
+ "criticalChunks": {
1348
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
1349
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
1350
+ "default": [],
1351
+ "type": "array",
1352
+ "items": {
1353
+ "type": "string"
1354
+ }
1355
+ },
1347
1356
  "deps": {
1348
1357
  "title": "list of the dependencies that will be shared",
1349
1358
  "default": [],
@@ -1755,23 +1764,23 @@
1755
1764
  "dotAll": {
1756
1765
  "type": "boolean"
1757
1766
  },
1758
- "__@match@8167": {
1767
+ "__@match@8168": {
1759
1768
  "type": "object",
1760
1769
  "additionalProperties": false
1761
1770
  },
1762
- "__@replace@8169": {
1771
+ "__@replace@8170": {
1763
1772
  "type": "object",
1764
1773
  "additionalProperties": false
1765
1774
  },
1766
- "__@search@8172": {
1775
+ "__@search@8173": {
1767
1776
  "type": "object",
1768
1777
  "additionalProperties": false
1769
1778
  },
1770
- "__@split@8174": {
1779
+ "__@split@8175": {
1771
1780
  "type": "object",
1772
1781
  "additionalProperties": false
1773
1782
  },
1774
- "__@matchAll@8176": {
1783
+ "__@matchAll@8177": {
1775
1784
  "type": "object",
1776
1785
  "additionalProperties": false
1777
1786
  }
@@ -1977,6 +1986,15 @@
1977
1986
  "default": true,
1978
1987
  "type": "boolean"
1979
1988
  },
1989
+ "criticalChunks": {
1990
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
1991
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
1992
+ "default": [],
1993
+ "type": "array",
1994
+ "items": {
1995
+ "type": "string"
1996
+ }
1997
+ },
1980
1998
  "deps": {
1981
1999
  "title": "list of the dependencies that will be shared",
1982
2000
  "default": [],
@@ -2388,23 +2406,23 @@
2388
2406
  "dotAll": {
2389
2407
  "type": "boolean"
2390
2408
  },
2391
- "__@match@8167": {
2409
+ "__@match@8168": {
2392
2410
  "type": "object",
2393
2411
  "additionalProperties": false
2394
2412
  },
2395
- "__@replace@8169": {
2413
+ "__@replace@8170": {
2396
2414
  "type": "object",
2397
2415
  "additionalProperties": false
2398
2416
  },
2399
- "__@search@8172": {
2417
+ "__@search@8173": {
2400
2418
  "type": "object",
2401
2419
  "additionalProperties": false
2402
2420
  },
2403
- "__@split@8174": {
2421
+ "__@split@8175": {
2404
2422
  "type": "object",
2405
2423
  "additionalProperties": false
2406
2424
  },
2407
- "__@matchAll@8176": {
2425
+ "__@matchAll@8177": {
2408
2426
  "type": "object",
2409
2427
  "additionalProperties": false
2410
2428
  }
@@ -2610,6 +2628,15 @@
2610
2628
  "default": true,
2611
2629
  "type": "boolean"
2612
2630
  },
2631
+ "criticalChunks": {
2632
+ "title": "add chunks to preload as critical in-parallel with \"platform.js\"",
2633
+ "description": "this option is useful when you need to create async boundary for app dependencies.\nMore info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption",
2634
+ "default": [],
2635
+ "type": "array",
2636
+ "items": {
2637
+ "type": "string"
2638
+ }
2639
+ },
2613
2640
  "deps": {
2614
2641
  "title": "list of the dependencies that will be shared",
2615
2642
  "default": [],
@@ -125,6 +125,7 @@ describe('JSON schema для tramvai.json', () => {
125
125
  "root": "src/app",
126
126
  "serverApiDir": "src/api",
127
127
  "shared": {
128
+ "criticalChunks": [],
128
129
  "deps": [],
129
130
  "flexibleTramvaiVersions": true,
130
131
  },
@@ -182,6 +183,7 @@ describe('JSON schema для tramvai.json', () => {
182
183
  },
183
184
  "root": "src/module",
184
185
  "shared": {
186
+ "criticalChunks": [],
185
187
  "deps": [],
186
188
  "flexibleTramvaiVersions": true,
187
189
  },
@@ -302,6 +302,13 @@ export interface CliConfigEntry extends ConfigEntry {
302
302
  * @default true
303
303
  */
304
304
  flexibleTramvaiVersions: boolean;
305
+ /**
306
+ * @title add chunks to preload as critical in-parallel with "platform.js"
307
+ * @description this option is useful when you need to create async boundary for app dependencies.
308
+ * More info - https://webpack.js.org/concepts/module-federation/#uncaught-error-shared-module-is-not-available-for-eager-consumption
309
+ * @default []
310
+ */
311
+ criticalChunks: string[];
305
312
  /**
306
313
  * @title list of the dependencies that will be shared
307
314
  * @default []