@tramvai/cli 3.0.0 → 3.2.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 (47) hide show
  1. package/README.md +2 -0
  2. package/lib/builder/webpack/tokens.d.ts +3 -0
  3. package/lib/builder/webpack/tokens.d.ts.map +1 -1
  4. package/lib/commands/update/dependantLibs.d.ts +1 -1
  5. package/lib/commands/update/dependantLibs.d.ts.map +1 -1
  6. package/lib/commands/update/dependantLibs.js +2 -2
  7. package/lib/commands/update/dependantLibs.js.map +1 -1
  8. package/lib/commands/update/update.js +1 -1
  9. package/lib/commands/update/update.js.map +1 -1
  10. package/lib/commands/update/updatePackageJson.d.ts +1 -1
  11. package/lib/commands/update/updatePackageJson.d.ts.map +1 -1
  12. package/lib/commands/update/updatePackageJson.js +6 -6
  13. package/lib/commands/update/updatePackageJson.js.map +1 -1
  14. package/lib/di/tokens/config.d.ts +1 -0
  15. package/lib/di/tokens/config.d.ts.map +1 -1
  16. package/lib/library/webpack/application/client/dev.js +1 -1
  17. package/lib/library/webpack/application/client/dev.js.map +1 -1
  18. package/lib/library/webpack/application/client/prod.d.ts.map +1 -1
  19. package/lib/library/webpack/application/client/prod.js +13 -4
  20. package/lib/library/webpack/application/client/prod.js.map +1 -1
  21. package/lib/library/webpack/application/server/common.js +2 -2
  22. package/lib/library/webpack/application/server/common.js.map +1 -1
  23. package/lib/library/webpack/application/server/dev.d.ts.map +1 -1
  24. package/lib/library/webpack/application/server/dev.js +3 -0
  25. package/lib/library/webpack/application/server/dev.js.map +1 -1
  26. package/lib/library/webpack/child-app/common.d.ts.map +1 -1
  27. package/lib/library/webpack/child-app/common.js +6 -3
  28. package/lib/library/webpack/child-app/common.js.map +1 -1
  29. package/lib/schema/autogeneratedSchema.json +48 -15
  30. package/lib/typings/configEntry/cli.d.ts +5 -0
  31. package/lib/typings/configEntry/cli.d.ts.map +1 -1
  32. package/package.json +13 -13
  33. package/schema.json +48 -15
  34. package/src/commands/update/dependantLibs.ts +3 -2
  35. package/src/commands/update/update.ts +1 -1
  36. package/src/commands/update/updatePackageJson.spec.ts +67 -2
  37. package/src/commands/update/updatePackageJson.ts +12 -5
  38. package/src/library/webpack/application/client/dev.ts +1 -1
  39. package/src/library/webpack/application/client/prod.ts +19 -4
  40. package/src/library/webpack/application/server/common.ts +2 -2
  41. package/src/library/webpack/application/server/dev.ts +4 -0
  42. package/src/library/webpack/child-app/common.ts +6 -3
  43. package/src/models/config.spec.ts +10 -3
  44. package/src/schema/autogeneratedSchema.json +48 -15
  45. package/src/schema/tramvai.spec.ts +6 -2
  46. package/src/typings/configEntry/cli.ts +5 -0
  47. package/src/typings/webpack-chain/index.d.ts +20 -40
package/schema.json CHANGED
@@ -1151,23 +1151,23 @@
1151
1151
  "dotAll": {
1152
1152
  "type": "boolean"
1153
1153
  },
1154
- "__@match@8743": {
1154
+ "__@match@8744": {
1155
1155
  "type": "object",
1156
1156
  "additionalProperties": false
1157
1157
  },
1158
- "__@replace@8745": {
1158
+ "__@replace@8746": {
1159
1159
  "type": "object",
1160
1160
  "additionalProperties": false
1161
1161
  },
1162
- "__@search@8748": {
1162
+ "__@search@8749": {
1163
1163
  "type": "object",
1164
1164
  "additionalProperties": false
1165
1165
  },
1166
- "__@split@8750": {
1166
+ "__@split@8751": {
1167
1167
  "type": "object",
1168
1168
  "additionalProperties": false
1169
1169
  },
1170
- "__@matchAll@8752": {
1170
+ "__@matchAll@8753": {
1171
1171
  "type": "object",
1172
1172
  "additionalProperties": false
1173
1173
  }
@@ -1192,6 +1192,17 @@
1192
1192
  }
1193
1193
  },
1194
1194
  "additionalProperties": false
1195
+ },
1196
+ "devtool": {
1197
+ "title": "Use the specified type of source maps for building in development mode",
1198
+ "default": "eval",
1199
+ "enum": [
1200
+ "eval",
1201
+ "eval-cheap-module-source-map",
1202
+ "eval-cheap-source-map",
1203
+ "eval-source-map"
1204
+ ],
1205
+ "type": "string"
1195
1206
  }
1196
1207
  },
1197
1208
  "additionalProperties": false
@@ -1819,23 +1830,23 @@
1819
1830
  "dotAll": {
1820
1831
  "type": "boolean"
1821
1832
  },
1822
- "__@match@8743": {
1833
+ "__@match@8744": {
1823
1834
  "type": "object",
1824
1835
  "additionalProperties": false
1825
1836
  },
1826
- "__@replace@8745": {
1837
+ "__@replace@8746": {
1827
1838
  "type": "object",
1828
1839
  "additionalProperties": false
1829
1840
  },
1830
- "__@search@8748": {
1841
+ "__@search@8749": {
1831
1842
  "type": "object",
1832
1843
  "additionalProperties": false
1833
1844
  },
1834
- "__@split@8750": {
1845
+ "__@split@8751": {
1835
1846
  "type": "object",
1836
1847
  "additionalProperties": false
1837
1848
  },
1838
- "__@matchAll@8752": {
1849
+ "__@matchAll@8753": {
1839
1850
  "type": "object",
1840
1851
  "additionalProperties": false
1841
1852
  }
@@ -1860,6 +1871,17 @@
1860
1871
  }
1861
1872
  },
1862
1873
  "additionalProperties": false
1874
+ },
1875
+ "devtool": {
1876
+ "title": "Use the specified type of source maps for building in development mode",
1877
+ "default": "eval",
1878
+ "enum": [
1879
+ "eval",
1880
+ "eval-cheap-module-source-map",
1881
+ "eval-cheap-source-map",
1882
+ "eval-source-map"
1883
+ ],
1884
+ "type": "string"
1863
1885
  }
1864
1886
  },
1865
1887
  "additionalProperties": false
@@ -2487,23 +2509,23 @@
2487
2509
  "dotAll": {
2488
2510
  "type": "boolean"
2489
2511
  },
2490
- "__@match@8743": {
2512
+ "__@match@8744": {
2491
2513
  "type": "object",
2492
2514
  "additionalProperties": false
2493
2515
  },
2494
- "__@replace@8745": {
2516
+ "__@replace@8746": {
2495
2517
  "type": "object",
2496
2518
  "additionalProperties": false
2497
2519
  },
2498
- "__@search@8748": {
2520
+ "__@search@8749": {
2499
2521
  "type": "object",
2500
2522
  "additionalProperties": false
2501
2523
  },
2502
- "__@split@8750": {
2524
+ "__@split@8751": {
2503
2525
  "type": "object",
2504
2526
  "additionalProperties": false
2505
2527
  },
2506
- "__@matchAll@8752": {
2528
+ "__@matchAll@8753": {
2507
2529
  "type": "object",
2508
2530
  "additionalProperties": false
2509
2531
  }
@@ -2528,6 +2550,17 @@
2528
2550
  }
2529
2551
  },
2530
2552
  "additionalProperties": false
2553
+ },
2554
+ "devtool": {
2555
+ "title": "Use the specified type of source maps for building in development mode",
2556
+ "default": "eval",
2557
+ "enum": [
2558
+ "eval",
2559
+ "eval-cheap-module-source-map",
2560
+ "eval-cheap-source-map",
2561
+ "eval-source-map"
2562
+ ],
2563
+ "type": "string"
2531
2564
  }
2532
2565
  },
2533
2566
  "additionalProperties": false
@@ -4,12 +4,13 @@ import { DEPENDANT_LIBS_MAP } from '../../utils/tramvaiVersions';
4
4
 
5
5
  export const getLibPackageVersion = async (
6
6
  name: string,
7
- unifiedVersion: string
7
+ unifiedVersion: string,
8
+ prerelease: boolean
8
9
  ): Promise<string | undefined> => {
9
10
  const unifiedModule = DEPENDANT_LIBS_MAP.get(name);
10
11
 
11
12
  if (!unifiedModule) {
12
- return getLatestPackageVersion(name);
13
+ return getLatestPackageVersion(name, { version: prerelease ? 'prerelease' : 'latest' });
13
14
  }
14
15
 
15
16
  const { dependencies } = await getPackageInfo(unifiedModule, { version: unifiedVersion });
@@ -21,7 +21,7 @@ export default async (
21
21
  message: `Tramvai version resolved to ${versionNumber}`,
22
22
  });
23
23
 
24
- await updatePackageJson(versionNumber);
24
+ await updatePackageJson(versionNumber, version === 'prerelease');
25
25
 
26
26
  context.logger.event({
27
27
  type: 'info',
@@ -2,6 +2,7 @@ import { updatePackageJson } from './updatePackageJson';
2
2
 
3
3
  const LATEST_TRAMVAI_VERSION = '1.115.6';
4
4
  const LATEST_LIB_VERSION = '0.8.23';
5
+ const PRERELEASE_LIB_VERSION = '2.0.1';
5
6
 
6
7
  let mockPackageJson: Record<string, any>;
7
8
  const mockFsWrite = jest.fn();
@@ -10,11 +11,13 @@ const mockPackageInfoDependencies = jest.fn<Record<string, string | undefined>,
10
11
  jest.mock('../../utils/commands/dependencies/packageHasVersion', () => ({
11
12
  packageHasVersion: () => true,
12
13
  }));
13
- jest.mock('latest-version', () => (dep: string) => {
14
+ jest.mock('latest-version', () => (dep: string, { version }) => {
14
15
  if (dep.startsWith('@tramvai')) {
15
16
  return LATEST_TRAMVAI_VERSION;
16
17
  }
17
-
18
+ if (version === 'prerelease') {
19
+ return PRERELEASE_LIB_VERSION;
20
+ }
18
21
  return LATEST_LIB_VERSION;
19
22
  });
20
23
 
@@ -91,3 +94,65 @@ it('should update tramvai deps to latest versions', async () => {
91
94
  ]
92
95
  `);
93
96
  });
97
+
98
+ it('prerelease should be used for dependant libs', async () => {
99
+ mockPackageJson = {
100
+ dependencies: {
101
+ '@tramvai/core': '1.93.2',
102
+ '@tramvai/module-common': '1.93.2',
103
+ '@tinkoff/router': '^0.2.3',
104
+ '@tinkoff/url': '0.3.2',
105
+ '@tinkoff/pack-polyfills': '1.0.0',
106
+ },
107
+ devDependencies: {
108
+ '@tramvai/cli': '1.93.2',
109
+ },
110
+ peerDependencies: {
111
+ '@tinkoff/dippy': '0.7.10',
112
+ },
113
+ };
114
+
115
+ mockPackageInfoDependencies.mockImplementation((dep: string) => {
116
+ switch (dep) {
117
+ case '@tramvai/core':
118
+ return { '@tinkoff/dippy': '0.7.44', '@tinkoff/utils': '^2.1.0' };
119
+ case '@tramvai/module-common':
120
+ return {
121
+ '@tinkoff/error': '0.6.1',
122
+ '@tinkoff/url': '0.4.1',
123
+ };
124
+ case '@tramvai/cli':
125
+ return {};
126
+ case '@tramvai/module-router':
127
+ return {
128
+ '@tinkoff/router': '0.4.3',
129
+ '@tinkoff/url': '0.4.1',
130
+ };
131
+ }
132
+
133
+ return {};
134
+ });
135
+
136
+ await updatePackageJson(LATEST_TRAMVAI_VERSION, true);
137
+
138
+ expect(mockFsWrite.mock.calls[0]).toMatchInlineSnapshot(`
139
+ [
140
+ "package.json",
141
+ "{
142
+ "dependencies": {
143
+ "@tramvai/core": "1.115.6",
144
+ "@tramvai/module-common": "1.115.6",
145
+ "@tinkoff/router": "0.4.3",
146
+ "@tinkoff/url": "0.4.1",
147
+ "@tinkoff/pack-polyfills": "2.0.1"
148
+ },
149
+ "devDependencies": {
150
+ "@tramvai/cli": "1.115.6"
151
+ },
152
+ "peerDependencies": {
153
+ "@tinkoff/dippy": "0.7.44"
154
+ }
155
+ }",
156
+ ]
157
+ `);
158
+ });
@@ -16,6 +16,7 @@ const getVersionFromDep = (dep?: string) => {
16
16
  const updateDependencies = (
17
17
  dependencies: Record<string, string> = {},
18
18
  targetVersion: string,
19
+ prerelease: boolean,
19
20
  currentVersion: string,
20
21
  spinner: Ora
21
22
  ) => {
@@ -27,7 +28,7 @@ const updateDependencies = (
27
28
  if (isUnifiedVersion(dep) && getVersionFromDep(dependencies[dep]) === currentVersion) {
28
29
  nextVersion = targetVersion;
29
30
  } else if (isDependantLib(dep)) {
30
- const libVersion = await getLibPackageVersion(dep, targetVersion);
31
+ const libVersion = await getLibPackageVersion(dep, targetVersion, prerelease);
31
32
  nextVersion = libVersion;
32
33
  }
33
34
 
@@ -60,7 +61,7 @@ const updateDependencies = (
60
61
  );
61
62
  };
62
63
 
63
- export const updatePackageJson = async (version: string) => {
64
+ export const updatePackageJson = async (version: string, prerelease?: boolean) => {
64
65
  const file = fs.readFileSync('package.json');
65
66
  const content = JSON.parse(file.toString());
66
67
  const currentVersion = getVersionFromDep(content.dependencies['@tramvai/core']);
@@ -79,9 +80,15 @@ export const updatePackageJson = async (version: string) => {
79
80
  const spinner = ora(`Updating package.json versions`).start();
80
81
 
81
82
  try {
82
- await updateDependencies(content.dependencies, version, currentVersion, spinner);
83
- await updateDependencies(content.devDependencies, version, currentVersion, spinner);
84
- await updateDependencies(content.peerDependencies, version, currentVersion, spinner);
83
+ await updateDependencies(content.dependencies, version, prerelease, currentVersion, spinner);
84
+ await updateDependencies(content.devDependencies, version, prerelease, currentVersion, spinner);
85
+ await updateDependencies(
86
+ content.peerDependencies,
87
+ version,
88
+ prerelease,
89
+ currentVersion,
90
+ spinner
91
+ );
85
92
 
86
93
  fs.writeFileSync('package.json', JSON.stringify(content, null, 2));
87
94
  } finally {
@@ -44,7 +44,7 @@ export const webpackClientConfig = ({
44
44
 
45
45
  config.mode('development');
46
46
 
47
- config.devtool('eval');
47
+ config.devtool(configManager.webpack.devtool);
48
48
 
49
49
  if (configManager.sourceMap) {
50
50
  config.batch(sourcemaps(configManager));
@@ -19,6 +19,21 @@ import commonProd from '../../common/client/prod';
19
19
  import { extractCssPluginFactory } from '../../blocks/extractCssPlugin';
20
20
  import { splitChunksConfig } from './prod/optimization/splitChunks';
21
21
 
22
+ const generateFilename = (
23
+ extension: string,
24
+ isChunk: boolean,
25
+ configManager: ConfigManager<ApplicationConfigEntry>
26
+ ) =>
27
+ [
28
+ '[name]',
29
+ !configManager.disableProdOptimization && '[contenthash]',
30
+ configManager.disableProdOptimization && configManager.modern && 'modern',
31
+ isChunk && 'chunk',
32
+ extension,
33
+ ]
34
+ .filter(Boolean)
35
+ .join('.');
36
+
22
37
  // eslint-disable-next-line max-statements
23
38
  export const webpackClientConfig = ({
24
39
  configManager,
@@ -35,8 +50,8 @@ export const webpackClientConfig = ({
35
50
  config.output
36
51
  .path(configManager.buildPath)
37
52
  .publicPath('')
38
- .filename('[name].[contenthash].js')
39
- .chunkFilename('[name].[contenthash].chunk.js')
53
+ .filename(generateFilename('js', false, configManager))
54
+ .chunkFilename(generateFilename('js', true, configManager))
40
55
  .crossOriginLoading('anonymous')
41
56
  .chunkLoadTimeout(240000);
42
57
 
@@ -48,8 +63,8 @@ export const webpackClientConfig = ({
48
63
 
49
64
  config.batch(
50
65
  extractCssPluginFactory(configManager, {
51
- filename: '[name].[contenthash].css',
52
- chunkFilename: '[name].[contenthash].chunk.css',
66
+ filename: generateFilename('css', false, configManager),
67
+ chunkFilename: generateFilename('css', true, configManager),
53
68
  })
54
69
  );
55
70
 
@@ -21,7 +21,7 @@ import { pwaBlock } from '../../blocks/pwa/server';
21
21
 
22
22
  // eslint-disable-next-line import/no-default-export
23
23
  export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config: Config) => {
24
- const { output, fileSystemPages } = configManager;
24
+ const { output, fileSystemPages, disableProdOptimization } = configManager;
25
25
 
26
26
  config
27
27
  .name('server')
@@ -41,7 +41,7 @@ export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config
41
41
  .batch(browserslistConfigResolve(configManager))
42
42
  .batch(
43
43
  extractCssPluginFactory(configManager, {
44
- filename: 'server.[contenthash].css',
44
+ filename: disableProdOptimization ? 'server.css' : 'server.[contenthash].css',
45
45
  chunkFilename: null,
46
46
  })
47
47
  )
@@ -35,6 +35,10 @@ export const webpackServerConfig = ({
35
35
 
36
36
  config.mode('development');
37
37
 
38
+ if (configManager.webpack.devtool !== 'eval') {
39
+ config.devtool(configManager.webpack.devtool);
40
+ }
41
+
38
42
  if (configManager.sourceMap) {
39
43
  config.batch(sourcemaps(configManager));
40
44
  }
@@ -91,9 +91,12 @@ export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: C
91
91
  // Way to reproduce: build and compare stats file for child-app with absolute and relative paths
92
92
  // -----
93
93
  // 2) path.relative should use the posix separator because
94
- // @module-federation/node library (https://github.com/module-federation/universe/blob/2dd44826954e5136bac08b0d9a0e7e01dbb8b79c/packages/typescript/src/lib/TypescriptCompiler.ts#L110)
95
- // is splitting path strings with regexp, which only works correctly for posix paths.
96
- entry: path.posix.relative(config.get('context'), entry),
94
+ // @module-federation/node is parsing relative path incorrectly
95
+ // Debug notes: there is problem in webpack/ModuleFederation or enhanced-resolve
96
+ entry: path
97
+ .relative(config.get('context'), entry)
98
+ .split(path.win32.sep)
99
+ .join(path.posix.sep),
97
100
  },
98
101
  shared: getSharedModules(configManager),
99
102
  } as UniversalFederationPluginOptions,
@@ -118,7 +118,9 @@ it('should populate defaults for config', () => {
118
118
  },
119
119
  "transpileOnlyModernLibs": true,
120
120
  "type": "application",
121
- "webpack": {},
121
+ "webpack": {
122
+ "devtool": "eval",
123
+ },
122
124
  },
123
125
  "child-app": {
124
126
  "cssMinimize": "css-minimizer",
@@ -170,7 +172,9 @@ it('should populate defaults for config', () => {
170
172
  },
171
173
  "transpileOnlyModernLibs": true,
172
174
  "type": "child-app",
173
- "webpack": {},
175
+ "webpack": {
176
+ "devtool": "eval",
177
+ },
174
178
  },
175
179
  },
176
180
  }
@@ -362,7 +366,9 @@ it('should populate defaults for overridable options', () => {
362
366
  },
363
367
  "transpileOnlyModernLibs": true,
364
368
  "type": "application",
365
- "webpack": {},
369
+ "webpack": {
370
+ "devtool": "eval",
371
+ },
366
372
  },
367
373
  "child-app": {
368
374
  "cssMinimize": "css-minimizer",
@@ -425,6 +431,7 @@ it('should populate defaults for overridable options', () => {
425
431
  "transpileOnlyModernLibs": true,
426
432
  "type": "child-app",
427
433
  "webpack": {
434
+ "devtool": "eval",
428
435
  "provide": {
429
436
  "Buffer": [
430
437
  "buffer",
@@ -1129,23 +1129,23 @@
1129
1129
  "dotAll": {
1130
1130
  "type": "boolean"
1131
1131
  },
1132
- "__@match@8743": {
1132
+ "__@match@8744": {
1133
1133
  "type": "object",
1134
1134
  "additionalProperties": false
1135
1135
  },
1136
- "__@replace@8745": {
1136
+ "__@replace@8746": {
1137
1137
  "type": "object",
1138
1138
  "additionalProperties": false
1139
1139
  },
1140
- "__@search@8748": {
1140
+ "__@search@8749": {
1141
1141
  "type": "object",
1142
1142
  "additionalProperties": false
1143
1143
  },
1144
- "__@split@8750": {
1144
+ "__@split@8751": {
1145
1145
  "type": "object",
1146
1146
  "additionalProperties": false
1147
1147
  },
1148
- "__@matchAll@8752": {
1148
+ "__@matchAll@8753": {
1149
1149
  "type": "object",
1150
1150
  "additionalProperties": false
1151
1151
  }
@@ -1170,6 +1170,17 @@
1170
1170
  }
1171
1171
  },
1172
1172
  "additionalProperties": false
1173
+ },
1174
+ "devtool": {
1175
+ "title": "Use the specified type of source maps for building in development mode",
1176
+ "default": "eval",
1177
+ "enum": [
1178
+ "eval",
1179
+ "eval-cheap-module-source-map",
1180
+ "eval-cheap-source-map",
1181
+ "eval-source-map"
1182
+ ],
1183
+ "type": "string"
1173
1184
  }
1174
1185
  },
1175
1186
  "additionalProperties": false
@@ -1788,23 +1799,23 @@
1788
1799
  "dotAll": {
1789
1800
  "type": "boolean"
1790
1801
  },
1791
- "__@match@8743": {
1802
+ "__@match@8744": {
1792
1803
  "type": "object",
1793
1804
  "additionalProperties": false
1794
1805
  },
1795
- "__@replace@8745": {
1806
+ "__@replace@8746": {
1796
1807
  "type": "object",
1797
1808
  "additionalProperties": false
1798
1809
  },
1799
- "__@search@8748": {
1810
+ "__@search@8749": {
1800
1811
  "type": "object",
1801
1812
  "additionalProperties": false
1802
1813
  },
1803
- "__@split@8750": {
1814
+ "__@split@8751": {
1804
1815
  "type": "object",
1805
1816
  "additionalProperties": false
1806
1817
  },
1807
- "__@matchAll@8752": {
1818
+ "__@matchAll@8753": {
1808
1819
  "type": "object",
1809
1820
  "additionalProperties": false
1810
1821
  }
@@ -1829,6 +1840,17 @@
1829
1840
  }
1830
1841
  },
1831
1842
  "additionalProperties": false
1843
+ },
1844
+ "devtool": {
1845
+ "title": "Use the specified type of source maps for building in development mode",
1846
+ "default": "eval",
1847
+ "enum": [
1848
+ "eval",
1849
+ "eval-cheap-module-source-map",
1850
+ "eval-cheap-source-map",
1851
+ "eval-source-map"
1852
+ ],
1853
+ "type": "string"
1832
1854
  }
1833
1855
  },
1834
1856
  "additionalProperties": false
@@ -2447,23 +2469,23 @@
2447
2469
  "dotAll": {
2448
2470
  "type": "boolean"
2449
2471
  },
2450
- "__@match@8743": {
2472
+ "__@match@8744": {
2451
2473
  "type": "object",
2452
2474
  "additionalProperties": false
2453
2475
  },
2454
- "__@replace@8745": {
2476
+ "__@replace@8746": {
2455
2477
  "type": "object",
2456
2478
  "additionalProperties": false
2457
2479
  },
2458
- "__@search@8748": {
2480
+ "__@search@8749": {
2459
2481
  "type": "object",
2460
2482
  "additionalProperties": false
2461
2483
  },
2462
- "__@split@8750": {
2484
+ "__@split@8751": {
2463
2485
  "type": "object",
2464
2486
  "additionalProperties": false
2465
2487
  },
2466
- "__@matchAll@8752": {
2488
+ "__@matchAll@8753": {
2467
2489
  "type": "object",
2468
2490
  "additionalProperties": false
2469
2491
  }
@@ -2488,6 +2510,17 @@
2488
2510
  }
2489
2511
  },
2490
2512
  "additionalProperties": false
2513
+ },
2514
+ "devtool": {
2515
+ "title": "Use the specified type of source maps for building in development mode",
2516
+ "default": "eval",
2517
+ "enum": [
2518
+ "eval",
2519
+ "eval-cheap-module-source-map",
2520
+ "eval-cheap-source-map",
2521
+ "eval-source-map"
2522
+ ],
2523
+ "type": "string"
2491
2524
  }
2492
2525
  },
2493
2526
  "additionalProperties": false
@@ -147,7 +147,9 @@ describe('JSON schema для tramvai.json', () => {
147
147
  },
148
148
  "transpileOnlyModernLibs": true,
149
149
  "type": "application",
150
- "webpack": {},
150
+ "webpack": {
151
+ "devtool": "eval",
152
+ },
151
153
  },
152
154
  "module": {
153
155
  "cssMinimize": "css-minimizer",
@@ -199,7 +201,9 @@ describe('JSON schema для tramvai.json', () => {
199
201
  },
200
202
  "transpileOnlyModernLibs": true,
201
203
  "type": "module",
202
- "webpack": {},
204
+ "webpack": {
205
+ "devtool": "eval",
206
+ },
203
207
  },
204
208
  },
205
209
  }
@@ -208,6 +208,11 @@ export interface CliConfigEntry extends ConfigEntry {
208
208
  * @description For OSX users and big projects it's recommended to enable watch polling, e.g. `{ poll: 1000 }`, more info - https://github.com/webpack/watchpack/issues/222
209
209
  */
210
210
  watchOptions?: Configuration['watchOptions'];
211
+ /**
212
+ * @title Use the specified type of source maps for building in development mode
213
+ * @default "eval"
214
+ */
215
+ devtool: 'eval' | 'eval-cheap-source-map' | 'eval-cheap-module-source-map' | 'eval-source-map';
211
216
  };
212
217
 
213
218
  // options that affect only production builds