@tramvai/cli 2.7.1 → 2.20.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 (154) hide show
  1. package/README.md +12 -0
  2. package/lib/api/analyze/index.d.ts +1 -0
  3. package/lib/api/analyze/index.js.map +1 -1
  4. package/lib/api/build/index.d.ts +1 -0
  5. package/lib/api/build/index.js.map +1 -1
  6. package/lib/api/start/index.d.ts +1 -0
  7. package/lib/api/start/index.js.map +1 -1
  8. package/lib/api/start/tokens.d.ts +4 -4
  9. package/lib/api/start/utils/banner.js +1 -1
  10. package/lib/api/start/utils/banner.js.map +1 -1
  11. package/lib/api/start-prod/index.d.ts +1 -0
  12. package/lib/api/start-prod/index.js.map +1 -1
  13. package/lib/api/start-prod/tokens.d.ts +4 -4
  14. package/lib/builder/webpack/providers/analyze/shared.js +23 -24
  15. package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
  16. package/lib/builder/webpack/tokens.d.ts +18 -18
  17. package/lib/commands/analyze/command.d.ts +8 -0
  18. package/lib/commands/analyze/command.js +6 -0
  19. package/lib/commands/analyze/command.js.map +1 -1
  20. package/lib/commands/build/command.js +6 -0
  21. package/lib/commands/build/command.js.map +1 -1
  22. package/lib/commands/index.d.ts +1 -1
  23. package/lib/commands/new/steps/initializationGit.js +2 -2
  24. package/lib/commands/new/steps/initializationGit.js.map +1 -1
  25. package/lib/commands/new/steps/installDependencies.js +10 -6
  26. package/lib/commands/new/steps/installDependencies.js.map +1 -1
  27. package/lib/commands/new/steps/renderTemplate.js +1 -1
  28. package/lib/commands/new/steps/renderTemplate.js.map +1 -1
  29. package/lib/commands/new/utils/applyTemplate.js +1 -1
  30. package/lib/commands/new/utils/applyTemplate.js.map +1 -1
  31. package/lib/commands/start/command.js +6 -0
  32. package/lib/commands/start/command.js.map +1 -1
  33. package/lib/commands/start-prod/command.js +6 -0
  34. package/lib/commands/start-prod/command.js.map +1 -1
  35. package/lib/commands/static/command.d.ts +6 -0
  36. package/lib/commands/static/command.js +6 -0
  37. package/lib/commands/static/command.js.map +1 -1
  38. package/lib/commands/update/dependantLibs.d.ts +2 -0
  39. package/lib/commands/update/dependantLibs.js +43 -0
  40. package/lib/commands/update/dependantLibs.js.map +1 -0
  41. package/lib/commands/update/updatePackageJson.js +7 -24
  42. package/lib/commands/update/updatePackageJson.js.map +1 -1
  43. package/lib/config/configManager.d.ts +3 -0
  44. package/lib/config/configManager.js +10 -7
  45. package/lib/config/configManager.js.map +1 -1
  46. package/lib/di/tokens/analytics.d.ts +3 -3
  47. package/lib/di/tokens/builder.d.ts +4 -4
  48. package/lib/di/tokens/command.d.ts +5 -5
  49. package/lib/di/tokens/config.d.ts +5 -5
  50. package/lib/di/tokens/logger.d.ts +1 -1
  51. package/lib/di/tokens/packageManager.d.ts +2 -2
  52. package/lib/di/tokens/server.d.ts +2 -2
  53. package/lib/di/tokens/std.d.ts +2 -2
  54. package/lib/di/tokens/ui.d.ts +3 -3
  55. package/lib/external/pages.d.ts +3 -5
  56. package/lib/external/pages.js.map +1 -1
  57. package/lib/library/babel/plugins/create-token-pure.d.ts +4 -1
  58. package/lib/library/babel/plugins/create-token-pure.js +5 -3
  59. package/lib/library/babel/plugins/create-token-pure.js.map +1 -1
  60. package/lib/library/webpack/application/client/common.js +1 -1
  61. package/lib/library/webpack/application/client/common.js.map +1 -1
  62. package/lib/library/webpack/application/server/common.js +1 -1
  63. package/lib/library/webpack/application/server/common.js.map +1 -1
  64. package/lib/library/webpack/blocks/configToEnv.js +1 -1
  65. package/lib/library/webpack/blocks/configToEnv.js.map +1 -1
  66. package/lib/library/webpack/blocks/filesClient.js +5 -2
  67. package/lib/library/webpack/blocks/filesClient.js.map +1 -1
  68. package/lib/library/webpack/blocks/filesServer.js +9 -5
  69. package/lib/library/webpack/blocks/filesServer.js.map +1 -1
  70. package/lib/library/webpack/blocks/pagesResolve.js +1 -1
  71. package/lib/library/webpack/blocks/pagesResolve.js.map +1 -1
  72. package/lib/library/webpack/common/main.js +17 -16
  73. package/lib/library/webpack/common/main.js.map +1 -1
  74. package/lib/library/webpack/loaders/image-loader/index.d.ts +5 -0
  75. package/lib/library/webpack/loaders/image-loader/index.js +25 -0
  76. package/lib/library/webpack/loaders/image-loader/index.js.map +1 -0
  77. package/lib/schema/autogeneratedSchema.json +165 -294
  78. package/lib/typings/configEntry/common.d.ts +169 -175
  79. package/lib/utils/commands/dependencies/checkVersions.js +3 -11
  80. package/lib/utils/commands/dependencies/checkVersions.js.map +1 -1
  81. package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts +1 -1
  82. package/lib/utils/commands/dependencies/getLatestPackageVersion.js +2 -6
  83. package/lib/utils/commands/dependencies/getLatestPackageVersion.js.map +1 -1
  84. package/lib/utils/commands/dependencies/getPackageInfo.d.ts +1 -0
  85. package/lib/utils/commands/dependencies/getPackageInfo.js +13 -0
  86. package/lib/utils/commands/dependencies/getPackageInfo.js.map +1 -0
  87. package/lib/utils/commands/dependencies/migrate.js +3 -11
  88. package/lib/utils/commands/dependencies/migrate.js.map +1 -1
  89. package/lib/utils/npmRequire.d.ts +15 -0
  90. package/lib/utils/npmRequire.js +15 -0
  91. package/lib/utils/npmRequire.js.map +1 -1
  92. package/lib/utils/shouldUseReactRoot.js +3 -3
  93. package/lib/utils/shouldUseReactRoot.js.map +1 -1
  94. package/lib/validators/commands/runMigrationsAndCheckVersions.js +3 -7
  95. package/lib/validators/commands/runMigrationsAndCheckVersions.js.map +1 -1
  96. package/package.json +89 -86
  97. package/schema.json +165 -294
  98. package/src/api/analyze/index.ts +1 -0
  99. package/src/api/build/__integration__/__fixtures__/tramvai.json +3 -0
  100. package/src/api/build/__integration__/build.test.ts +1 -0
  101. package/src/api/build/index.ts +1 -0
  102. package/src/api/start/__integration__/__fixtures__/tramvai.json +2 -4
  103. package/src/api/start/index.ts +1 -0
  104. package/src/api/start/utils/banner.ts +1 -1
  105. package/src/api/start-prod/index.ts +1 -0
  106. package/src/builder/webpack/providers/analyze/shared.ts +1 -1
  107. package/src/commands/analyze/command.ts +6 -0
  108. package/src/commands/build/command.ts +6 -0
  109. package/src/commands/generate/generators/action/action.ts.hbs +4 -4
  110. package/src/commands/new/steps/initializationGit.ts +3 -2
  111. package/src/commands/new/steps/installDependencies.ts +15 -8
  112. package/src/commands/new/steps/renderTemplate.ts +1 -1
  113. package/src/commands/new/templates/app/monorepo/tramvai.json.hbs +2 -4
  114. package/src/commands/new/templates/app/multirepo/tramvai.json.hbs +2 -4
  115. package/src/commands/new/templates/shared/_npmrc.hbs +0 -1
  116. package/src/commands/new/utils/applyTemplate.ts +5 -1
  117. package/src/commands/start/command.ts +6 -0
  118. package/src/commands/start-prod/command.ts +6 -0
  119. package/src/commands/static/command.ts +6 -0
  120. package/src/commands/update/dependantLibs.ts +49 -0
  121. package/src/commands/update/updatePackageJson.spec.ts +99 -0
  122. package/src/commands/update/updatePackageJson.ts +7 -25
  123. package/src/config/configManager.ts +9 -3
  124. package/src/external/pages.ts +3 -5
  125. package/src/library/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +5 -0
  126. package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +18 -0
  127. package/src/library/babel/plugins/create-token-pure.spec.ts +4 -0
  128. package/src/library/babel/plugins/create-token-pure.ts +9 -4
  129. package/src/library/webpack/application/client/common.ts +1 -3
  130. package/src/library/webpack/application/server/common.ts +1 -3
  131. package/src/library/webpack/blocks/configToEnv.ts +1 -1
  132. package/src/library/webpack/blocks/filesClient.ts +5 -2
  133. package/src/library/webpack/blocks/filesServer.ts +8 -5
  134. package/src/library/webpack/blocks/pagesResolve.ts +1 -1
  135. package/src/library/webpack/common/main.ts +19 -18
  136. package/src/library/webpack/loaders/image-loader/index.ts +26 -0
  137. package/src/schema/autogeneratedSchema.json +165 -294
  138. package/src/schema/tramvai.spec.ts +146 -148
  139. package/src/typings/configEntry/common.ts +171 -175
  140. package/src/utils/commands/dependencies/checkVersions.ts +3 -13
  141. package/src/utils/commands/dependencies/getLatestPackageVersion.ts +2 -7
  142. package/src/utils/commands/dependencies/getPackageInfo.ts +10 -0
  143. package/src/utils/commands/dependencies/migrate.ts +3 -13
  144. package/src/utils/npmRequire.ts +15 -0
  145. package/src/utils/shouldUseReactRoot.ts +4 -4
  146. package/src/validators/commands/runMigrationsAndCheckVersions.ts +3 -8
  147. package/lib/utils/commands/dependencies/update.d.ts +0 -7
  148. package/lib/utils/commands/dependencies/update.js +0 -19
  149. package/lib/utils/commands/dependencies/update.js.map +0 -1
  150. package/lib/utils/commands/dependencies/updatePackageJson.d.ts +0 -1
  151. package/lib/utils/commands/dependencies/updatePackageJson.js +0 -57
  152. package/lib/utils/commands/dependencies/updatePackageJson.js.map +0 -1
  153. package/src/utils/commands/dependencies/update.ts +0 -31
  154. package/src/utils/commands/dependencies/updatePackageJson.ts +0 -63
package/schema.json CHANGED
@@ -88,12 +88,12 @@
88
88
  "properties": {
89
89
  "modern": {
90
90
  "title": "Enable production build for modern browsers",
91
- "default": false,
91
+ "default": true,
92
92
  "type": "boolean"
93
93
  },
94
94
  "dedupe": {
95
95
  "title": "Enable DedupePlugin",
96
- "default": false,
96
+ "default": "equality",
97
97
  "enum": [
98
98
  "equality",
99
99
  false,
@@ -233,6 +233,59 @@
233
233
  "default": true,
234
234
  "type": "boolean"
235
235
  },
236
+ "webpackResolveAlias": {
237
+ "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
238
+ "additionalProperties": true,
239
+ "type": "object"
240
+ },
241
+ "webpackProvide": {
242
+ "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
243
+ "additionalProperties": true,
244
+ "type": "object"
245
+ },
246
+ "fileSystemPages": {
247
+ "title": "experimental settings for File-System Routing feature",
248
+ "default": {},
249
+ "type": "object",
250
+ "properties": {
251
+ "enable": {
252
+ "title": "Read pages from file system",
253
+ "default": false,
254
+ "type": "boolean"
255
+ },
256
+ "routesDir": {
257
+ "title": "Folder with pages from which static routers are generated",
258
+ "default": "routes",
259
+ "anyOf": [
260
+ {
261
+ "enum": [
262
+ false
263
+ ],
264
+ "type": "boolean"
265
+ },
266
+ {
267
+ "type": "string"
268
+ }
269
+ ]
270
+ },
271
+ "pagesDir": {
272
+ "title": "Folder with components which can be manually added to static routers",
273
+ "default": "pages",
274
+ "anyOf": [
275
+ {
276
+ "enum": [
277
+ false
278
+ ],
279
+ "type": "boolean"
280
+ },
281
+ {
282
+ "type": "string"
283
+ }
284
+ ]
285
+ }
286
+ },
287
+ "additionalProperties": false
288
+ },
236
289
  "experiments": {
237
290
  "title": "Experimental settings",
238
291
  "default": {},
@@ -312,49 +365,6 @@
312
365
  },
313
366
  "additionalProperties": false
314
367
  },
315
- "fileSystemPages": {
316
- "title": "experimental settings for File-System Routing feature",
317
- "default": {},
318
- "type": "object",
319
- "properties": {
320
- "enable": {
321
- "title": "Read pages from file system",
322
- "default": false,
323
- "type": "boolean"
324
- },
325
- "routesDir": {
326
- "title": "Folder with pages from which static routers are generated",
327
- "default": "routes",
328
- "anyOf": [
329
- {
330
- "enum": [
331
- false
332
- ],
333
- "type": "boolean"
334
- },
335
- {
336
- "type": "string"
337
- }
338
- ]
339
- },
340
- "pagesDir": {
341
- "title": "Folder with components which can be manually added to static routers",
342
- "default": "pages",
343
- "anyOf": [
344
- {
345
- "enum": [
346
- false
347
- ],
348
- "type": "boolean"
349
- },
350
- {
351
- "type": "string"
352
- }
353
- ]
354
- }
355
- },
356
- "additionalProperties": false
357
- },
358
368
  "transpilation": {
359
369
  "title": "experimental settings for code transpilation",
360
370
  "default": {},
@@ -375,16 +385,6 @@
375
385
  },
376
386
  "additionalProperties": false
377
387
  },
378
- "webpackResolveAlias": {
379
- "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
380
- "additionalProperties": true,
381
- "type": "object"
382
- },
383
- "webpackProvide": {
384
- "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
385
- "additionalProperties": true,
386
- "type": "object"
387
- },
388
388
  "granularChunks": {
389
389
  "title": "Separate one common chunk to many small dynamic chunks",
390
390
  "default": false,
@@ -1102,49 +1102,6 @@
1102
1102
  },
1103
1103
  "additionalProperties": false
1104
1104
  },
1105
- "fileSystemPages": {
1106
- "title": "experimental settings for File-System Routing feature",
1107
- "default": {},
1108
- "type": "object",
1109
- "properties": {
1110
- "enable": {
1111
- "title": "Read pages from file system",
1112
- "default": false,
1113
- "type": "boolean"
1114
- },
1115
- "routesDir": {
1116
- "title": "Folder with pages from which static routers are generated",
1117
- "default": "routes",
1118
- "anyOf": [
1119
- {
1120
- "enum": [
1121
- false
1122
- ],
1123
- "type": "boolean"
1124
- },
1125
- {
1126
- "type": "string"
1127
- }
1128
- ]
1129
- },
1130
- "pagesDir": {
1131
- "title": "Folder with components which can be manually added to static routers",
1132
- "default": "pages",
1133
- "anyOf": [
1134
- {
1135
- "enum": [
1136
- false
1137
- ],
1138
- "type": "boolean"
1139
- },
1140
- {
1141
- "type": "string"
1142
- }
1143
- ]
1144
- }
1145
- },
1146
- "additionalProperties": false
1147
- },
1148
1105
  "transpilation": {
1149
1106
  "title": "experimental settings for code transpilation",
1150
1107
  "default": {},
@@ -1255,12 +1212,12 @@
1255
1212
  "properties": {
1256
1213
  "modern": {
1257
1214
  "title": "Enable production build for modern browsers",
1258
- "default": false,
1215
+ "default": true,
1259
1216
  "type": "boolean"
1260
1217
  },
1261
1218
  "dedupe": {
1262
1219
  "title": "Enable DedupePlugin",
1263
- "default": false,
1220
+ "default": "equality",
1264
1221
  "enum": [
1265
1222
  "equality",
1266
1223
  false,
@@ -1401,6 +1358,59 @@
1401
1358
  "default": true,
1402
1359
  "type": "boolean"
1403
1360
  },
1361
+ "webpackResolveAlias": {
1362
+ "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
1363
+ "additionalProperties": true,
1364
+ "type": "object"
1365
+ },
1366
+ "webpackProvide": {
1367
+ "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
1368
+ "additionalProperties": true,
1369
+ "type": "object"
1370
+ },
1371
+ "fileSystemPages": {
1372
+ "title": "experimental settings for File-System Routing feature",
1373
+ "default": {},
1374
+ "type": "object",
1375
+ "properties": {
1376
+ "enable": {
1377
+ "title": "Read pages from file system",
1378
+ "default": false,
1379
+ "type": "boolean"
1380
+ },
1381
+ "routesDir": {
1382
+ "title": "Folder with pages from which static routers are generated",
1383
+ "default": "routes",
1384
+ "anyOf": [
1385
+ {
1386
+ "enum": [
1387
+ false
1388
+ ],
1389
+ "type": "boolean"
1390
+ },
1391
+ {
1392
+ "type": "string"
1393
+ }
1394
+ ]
1395
+ },
1396
+ "pagesDir": {
1397
+ "title": "Folder with components which can be manually added to static routers",
1398
+ "default": "pages",
1399
+ "anyOf": [
1400
+ {
1401
+ "enum": [
1402
+ false
1403
+ ],
1404
+ "type": "boolean"
1405
+ },
1406
+ {
1407
+ "type": "string"
1408
+ }
1409
+ ]
1410
+ }
1411
+ },
1412
+ "additionalProperties": false
1413
+ },
1404
1414
  "experiments": {
1405
1415
  "title": "Experimental settings",
1406
1416
  "default": {},
@@ -1480,49 +1490,6 @@
1480
1490
  },
1481
1491
  "additionalProperties": false
1482
1492
  },
1483
- "fileSystemPages": {
1484
- "title": "experimental settings for File-System Routing feature",
1485
- "default": {},
1486
- "type": "object",
1487
- "properties": {
1488
- "enable": {
1489
- "title": "Read pages from file system",
1490
- "default": false,
1491
- "type": "boolean"
1492
- },
1493
- "routesDir": {
1494
- "title": "Folder with pages from which static routers are generated",
1495
- "default": "routes",
1496
- "anyOf": [
1497
- {
1498
- "enum": [
1499
- false
1500
- ],
1501
- "type": "boolean"
1502
- },
1503
- {
1504
- "type": "string"
1505
- }
1506
- ]
1507
- },
1508
- "pagesDir": {
1509
- "title": "Folder with components which can be manually added to static routers",
1510
- "default": "pages",
1511
- "anyOf": [
1512
- {
1513
- "enum": [
1514
- false
1515
- ],
1516
- "type": "boolean"
1517
- },
1518
- {
1519
- "type": "string"
1520
- }
1521
- ]
1522
- }
1523
- },
1524
- "additionalProperties": false
1525
- },
1526
1493
  "transpilation": {
1527
1494
  "title": "experimental settings for code transpilation",
1528
1495
  "default": {},
@@ -1542,16 +1509,6 @@
1542
1509
  }
1543
1510
  },
1544
1511
  "additionalProperties": false
1545
- },
1546
- "webpackResolveAlias": {
1547
- "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
1548
- "additionalProperties": true,
1549
- "type": "object"
1550
- },
1551
- "webpackProvide": {
1552
- "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
1553
- "additionalProperties": true,
1554
- "type": "object"
1555
1512
  }
1556
1513
  }
1557
1514
  }
@@ -1748,49 +1705,6 @@
1748
1705
  },
1749
1706
  "additionalProperties": false
1750
1707
  },
1751
- "fileSystemPages": {
1752
- "title": "experimental settings for File-System Routing feature",
1753
- "default": {},
1754
- "type": "object",
1755
- "properties": {
1756
- "enable": {
1757
- "title": "Read pages from file system",
1758
- "default": false,
1759
- "type": "boolean"
1760
- },
1761
- "routesDir": {
1762
- "title": "Folder with pages from which static routers are generated",
1763
- "default": "routes",
1764
- "anyOf": [
1765
- {
1766
- "enum": [
1767
- false
1768
- ],
1769
- "type": "boolean"
1770
- },
1771
- {
1772
- "type": "string"
1773
- }
1774
- ]
1775
- },
1776
- "pagesDir": {
1777
- "title": "Folder with components which can be manually added to static routers",
1778
- "default": "pages",
1779
- "anyOf": [
1780
- {
1781
- "enum": [
1782
- false
1783
- ],
1784
- "type": "boolean"
1785
- },
1786
- {
1787
- "type": "string"
1788
- }
1789
- ]
1790
- }
1791
- },
1792
- "additionalProperties": false
1793
- },
1794
1708
  "transpilation": {
1795
1709
  "title": "experimental settings for code transpilation",
1796
1710
  "default": {},
@@ -1881,12 +1795,12 @@
1881
1795
  "properties": {
1882
1796
  "modern": {
1883
1797
  "title": "Enable production build for modern browsers",
1884
- "default": false,
1798
+ "default": true,
1885
1799
  "type": "boolean"
1886
1800
  },
1887
1801
  "dedupe": {
1888
1802
  "title": "Enable DedupePlugin",
1889
- "default": false,
1803
+ "default": "equality",
1890
1804
  "enum": [
1891
1805
  "equality",
1892
1806
  false,
@@ -2027,6 +1941,59 @@
2027
1941
  "default": true,
2028
1942
  "type": "boolean"
2029
1943
  },
1944
+ "webpackResolveAlias": {
1945
+ "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
1946
+ "additionalProperties": true,
1947
+ "type": "object"
1948
+ },
1949
+ "webpackProvide": {
1950
+ "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
1951
+ "additionalProperties": true,
1952
+ "type": "object"
1953
+ },
1954
+ "fileSystemPages": {
1955
+ "title": "experimental settings for File-System Routing feature",
1956
+ "default": {},
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "enable": {
1960
+ "title": "Read pages from file system",
1961
+ "default": false,
1962
+ "type": "boolean"
1963
+ },
1964
+ "routesDir": {
1965
+ "title": "Folder with pages from which static routers are generated",
1966
+ "default": "routes",
1967
+ "anyOf": [
1968
+ {
1969
+ "enum": [
1970
+ false
1971
+ ],
1972
+ "type": "boolean"
1973
+ },
1974
+ {
1975
+ "type": "string"
1976
+ }
1977
+ ]
1978
+ },
1979
+ "pagesDir": {
1980
+ "title": "Folder with components which can be manually added to static routers",
1981
+ "default": "pages",
1982
+ "anyOf": [
1983
+ {
1984
+ "enum": [
1985
+ false
1986
+ ],
1987
+ "type": "boolean"
1988
+ },
1989
+ {
1990
+ "type": "string"
1991
+ }
1992
+ ]
1993
+ }
1994
+ },
1995
+ "additionalProperties": false
1996
+ },
2030
1997
  "experiments": {
2031
1998
  "title": "Experimental settings",
2032
1999
  "default": {},
@@ -2106,49 +2073,6 @@
2106
2073
  },
2107
2074
  "additionalProperties": false
2108
2075
  },
2109
- "fileSystemPages": {
2110
- "title": "experimental settings for File-System Routing feature",
2111
- "default": {},
2112
- "type": "object",
2113
- "properties": {
2114
- "enable": {
2115
- "title": "Read pages from file system",
2116
- "default": false,
2117
- "type": "boolean"
2118
- },
2119
- "routesDir": {
2120
- "title": "Folder with pages from which static routers are generated",
2121
- "default": "routes",
2122
- "anyOf": [
2123
- {
2124
- "enum": [
2125
- false
2126
- ],
2127
- "type": "boolean"
2128
- },
2129
- {
2130
- "type": "string"
2131
- }
2132
- ]
2133
- },
2134
- "pagesDir": {
2135
- "title": "Folder with components which can be manually added to static routers",
2136
- "default": "pages",
2137
- "anyOf": [
2138
- {
2139
- "enum": [
2140
- false
2141
- ],
2142
- "type": "boolean"
2143
- },
2144
- {
2145
- "type": "string"
2146
- }
2147
- ]
2148
- }
2149
- },
2150
- "additionalProperties": false
2151
- },
2152
2076
  "transpilation": {
2153
2077
  "title": "experimental settings for code transpilation",
2154
2078
  "default": {},
@@ -2168,16 +2092,6 @@
2168
2092
  }
2169
2093
  },
2170
2094
  "additionalProperties": false
2171
- },
2172
- "webpackResolveAlias": {
2173
- "title": "Browser package resolve aliases. E.g. { \"stream\": \"stream-browserify\" }",
2174
- "additionalProperties": true,
2175
- "type": "object"
2176
- },
2177
- "webpackProvide": {
2178
- "title": "Browser packages to provide with ProvidePlugin. E.g. { \"Buffer\": [\"buffer\", \"Buffer\"] }",
2179
- "additionalProperties": true,
2180
- "type": "object"
2181
2095
  }
2182
2096
  }
2183
2097
  }
@@ -2374,49 +2288,6 @@
2374
2288
  },
2375
2289
  "additionalProperties": false
2376
2290
  },
2377
- "fileSystemPages": {
2378
- "title": "experimental settings for File-System Routing feature",
2379
- "default": {},
2380
- "type": "object",
2381
- "properties": {
2382
- "enable": {
2383
- "title": "Read pages from file system",
2384
- "default": false,
2385
- "type": "boolean"
2386
- },
2387
- "routesDir": {
2388
- "title": "Folder with pages from which static routers are generated",
2389
- "default": "routes",
2390
- "anyOf": [
2391
- {
2392
- "enum": [
2393
- false
2394
- ],
2395
- "type": "boolean"
2396
- },
2397
- {
2398
- "type": "string"
2399
- }
2400
- ]
2401
- },
2402
- "pagesDir": {
2403
- "title": "Folder with components which can be manually added to static routers",
2404
- "default": "pages",
2405
- "anyOf": [
2406
- {
2407
- "enum": [
2408
- false
2409
- ],
2410
- "type": "boolean"
2411
- },
2412
- {
2413
- "type": "string"
2414
- }
2415
- ]
2416
- }
2417
- },
2418
- "additionalProperties": false
2419
- },
2420
2291
  "transpilation": {
2421
2292
  "title": "experimental settings for code transpilation",
2422
2293
  "default": {},
@@ -8,6 +8,7 @@ export interface Params {
8
8
  plugin?: 'bundle' | 'whybundled' | 'statoscope';
9
9
  modern?: boolean;
10
10
  showConfig?: boolean;
11
+ fileCache?: boolean;
11
12
  }
12
13
 
13
14
  export type AnalyzeCommand = (params: Params) => Promise<void>;
@@ -9,6 +9,9 @@
9
9
  "build": {
10
10
  "options": {
11
11
  "server": "app/server.tsx"
12
+ },
13
+ "configurations": {
14
+ "modern": false
12
15
  }
13
16
  }
14
17
  }
@@ -61,6 +61,7 @@ Array [
61
61
  server: resolve(FIXTURES_DIR, 'app/server'),
62
62
  },
63
63
  configurations: {
64
+ modern: false,
64
65
  definePlugin: {
65
66
  dev: {
66
67
  IS_REACT_APP: true,
@@ -18,6 +18,7 @@ export type Params = WithConfig<{
18
18
  disableProdOptimization?: boolean;
19
19
  showConfig?: boolean;
20
20
  env?: Record<string, string>;
21
+ fileCache?: boolean;
21
22
 
22
23
  // `package` target parameters
23
24
  watchMode?: boolean;
@@ -12,10 +12,8 @@
12
12
  "serverApiDir": "app/api"
13
13
  },
14
14
  "configurations": {
15
- "experiments": {
16
- "fileSystemPages": {
17
- "enable": true
18
- }
15
+ "fileSystemPages": {
16
+ "enable": true
19
17
  }
20
18
  }
21
19
  },
@@ -26,6 +26,7 @@ export type Params = WithConfig<{
26
26
  env?: Record<string, string>;
27
27
  onlyBundles?: string[];
28
28
  strictErrorHandle?: boolean;
29
+ fileCache?: boolean;
29
30
  }>;
30
31
 
31
32
  export type Result<T extends string = any> = Promise<
@@ -24,7 +24,7 @@ export function showBanner(di: Container) {
24
24
  titleLines.push(`${label('Modern')} ${config.modern}`);
25
25
  titleLines.push(`${label('ReactRefresh')} ${config.hotRefresh}`);
26
26
 
27
- if (config.build.configurations.experiments.fileSystemPages.enable) {
27
+ if (config.build.configurations.fileSystemPages.enable) {
28
28
  titleLines.push(`${label('FileSystemPages')} true`);
29
29
  }
30
30
 
@@ -19,6 +19,7 @@ export type Params = WithConfig<{
19
19
  resolveSymlinks?: boolean;
20
20
  showConfig?: boolean;
21
21
  env?: Record<string, string>;
22
+ fileCache?: boolean;
22
23
  }>;
23
24
 
24
25
  export type Result<T extends string = any> = Promise<