@tramvai/cli 2.130.10 → 2.132.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.
@@ -53,11 +53,10 @@ export declare const CLIENT_CONFIG_MANAGER_TOKEN: {
53
53
  [x: string]: any;
54
54
  };
55
55
  svgo?: {
56
- plugins?: {
57
- [x: string]: any;
56
+ plugins?: (string | {
58
57
  name: string;
59
- active: boolean;
60
- }[];
58
+ params: Record<string, any>;
59
+ })[];
61
60
  };
62
61
  imageOptimization?: {
63
62
  enabled?: boolean;
@@ -181,11 +180,10 @@ export declare const CLIENT_MODERN_CONFIG_MANAGER_TOKEN: {
181
180
  [x: string]: any;
182
181
  };
183
182
  svgo?: {
184
- plugins?: {
185
- [x: string]: any;
183
+ plugins?: (string | {
186
184
  name: string;
187
- active: boolean;
188
- }[];
185
+ params: Record<string, any>;
186
+ })[];
189
187
  };
190
188
  imageOptimization?: {
191
189
  enabled?: boolean;
@@ -309,11 +307,10 @@ export declare const SERVER_CONFIG_MANAGER_TOKEN: {
309
307
  [x: string]: any;
310
308
  };
311
309
  svgo?: {
312
- plugins?: {
313
- [x: string]: any;
310
+ plugins?: (string | {
314
311
  name: string;
315
- active: boolean;
316
- }[];
312
+ params: Record<string, any>;
313
+ })[];
317
314
  };
318
315
  imageOptimization?: {
319
316
  enabled?: boolean;
@@ -63,11 +63,10 @@ export declare const CONFIG_MANAGER_TOKEN: {
63
63
  [x: string]: any;
64
64
  };
65
65
  svgo?: {
66
- plugins?: {
67
- [x: string]: any;
66
+ plugins?: (string | {
68
67
  name: string;
69
- active: boolean;
70
- }[];
68
+ params: Record<string, any>;
69
+ })[];
71
70
  };
72
71
  imageOptimization?: {
73
72
  enabled?: boolean;
@@ -20,7 +20,7 @@ const stats_1 = require("../../constants/stats");
20
20
  const client_1 = require("../../blocks/pwa/client");
21
21
  const ModuleFederationFixRange_1 = require("../../plugins/ModuleFederationFixRange");
22
22
  exports.default = (configManager) => (config) => {
23
- const { polyfill, fileSystemPages, shared } = configManager;
23
+ const { polyfill, fileSystemPages, shared, env } = configManager;
24
24
  const portal = path_1.default.resolve(configManager.rootDir, `packages/${process.env.APP_ID}/portal.js`);
25
25
  const polyfillPath = path_1.default.resolve(configManager.rootDir, polyfill !== null && polyfill !== void 0 ? polyfill : 'src/polyfill');
26
26
  const portalExists = fs_1.default.existsSync(portal);
@@ -56,8 +56,8 @@ exports.default = (configManager) => (config) => {
56
56
  .use(webpack_stats_plugin_1.StatsWriterPlugin, [
57
57
  {
58
58
  filename: configManager.modern ? 'stats.modern.json' : 'stats.json',
59
- stats: stats_1.DEFAULT_STATS_OPTIONS,
60
- fields: stats_1.DEFAULT_STATS_FIELDS,
59
+ stats: env === 'development' ? stats_1.DEV_STATS_OPTIONS : stats_1.DEFAULT_STATS_OPTIONS,
60
+ fields: env === 'development' ? stats_1.DEV_STATS_FIELDS : stats_1.DEFAULT_STATS_FIELDS,
61
61
  },
62
62
  ])
63
63
  .end()
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/library/webpack/application/client/common.ts"],"names":[],"mappings":";;;AAAA,wDAAwB;AACxB,oDAAoB;AAEpB,+DAAyD;AAIzD,+DAAmE;AAEnE,qEAAuC;AACvC,sCAA8C;AAC9C,mFAA6C;AAC7C,iEAAiC;AACjC,iEAAiC;AACjC,qEAAqC;AACrC,mEAAmC;AACnC,uFAAuD;AACvD,iFAAiD;AACjD,4DAAyD;AACzD,0DAAuD;AACvD,iDAAoF;AACpF,oDAAmD;AAEnD,qFAAkF;AAElF,kBAAe,CAAC,aAAoD,EAAE,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE;IAC1F,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC;IAE5D,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,OAAO,CAAC,GAAG,CAAC,MAAM,YAAY,C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,MAAM;SACH,KAAK,CAAC,UAAU,CAAC;SACjB,GAAG,CAAC,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,IAAI,QAAQ,CAAC,CAAC;SACvE,GAAG,EAAE;SACL,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SAC5D,IAAI,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1E,MAAM,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC,GAAG,CAAC,mDAAwB,EAAE;QACnF;YACE,uBAAuB,EAAE,MAAM,CAAC,uBAAuB;SACrB;KACrC,CAAC,CAAC;IAEH,MAAM;SACH,MAAM,CAAC,cAAc,CAAC;SACtB,GAAG,CAAC,wCAAiB,EAAE;QACtB;YACE,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,YAAY;YACnE,KAAK,EAAE,6BAAqB;YAC5B,MAAM,EAAE,4BAAoB;SAC7B;KACF,CAAC;SACD,GAAG,EAAE;SACL,MAAM,CAAC,QAAQ,CAAC;SAChB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;wCAER,IAAI,CAAC,CAAC,CAAC,KACV,qBAAqB,EAAE,IAAI,EAC3B,oBAAoB,EAAE,KAAK;KAE9B,CAAC,CAAC;IAEL,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/library/webpack/application/client/common.ts"],"names":[],"mappings":";;;AAAA,wDAAwB;AACxB,oDAAoB;AAEpB,+DAAyD;AAIzD,+DAAmE;AAEnE,qEAAuC;AACvC,sCAA8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aAAa,CAAC,CAAC,CAAC,yBAAiB,CAAC,CAAC,CAAC,6BAAqB;YACxE,MAAM,EAAE,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,wBAAgB,CAAC,CAAC,CAAC,4BAAoB;SACxE;KACF,CAAC;SACD,GAAG,EAAE;SACL,MAAM,CAAC,QAAQ,CAAC;SAChB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;wCAER,IAAI,CAAC,CAAC,CAAC,KACV,qBAAqB,EAAE,IAAI,EAC3B,oBAAoB,EAAE,KAAK;KAE9B,CAAC,CAAC;IAEL,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -4,7 +4,6 @@ exports.splitChunksConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = tslib_1.__importDefault(require("path"));
6
6
  const crypto_1 = tslib_1.__importDefault(require("crypto"));
7
- const sharedChunksNameCache = new WeakMap();
8
7
  // based on [nextjs code](https://github.com/vercel/next.js/blob/aaeb349ce3e8c4c3435a43a29af4379266818e7b/packages/next/build/webpack-config.ts#L707)
9
8
  const resolveFrameworksPaths = (rootDir, frameworksList) => {
10
9
  const topLevelFrameworkPaths = [];
@@ -73,21 +72,21 @@ const splitChunksConfig = (configManager) => (config) => {
73
72
  minSize: splitChunks.granularChunksMinSize,
74
73
  reuseExistingChunk: true,
75
74
  priority: 30,
76
- name: (module, chunks = []) => {
77
- if (sharedChunksNameCache.has(module)) {
78
- return sharedChunksNameCache.get(module);
79
- }
80
- const name = crypto_1.default
75
+ };
76
+ // too slow for development, default names is fast, but have one problem -
77
+ // we can find shared chunk filenames only in `chunks` stats property, not in `assetsByChunkName`
78
+ // https://github.com/webpack/webpack/issues/14433#issuecomment-938468513
79
+ if (env === 'production') {
80
+ shared.name = (module, chunks = []) => {
81
+ return crypto_1.default
81
82
  .createHash('sha1')
82
83
  .update(chunks.reduce((acc, chunk) => {
83
84
  return acc + chunk.name;
84
85
  }, ''))
85
86
  .digest('hex')
86
- .substring(0, 8);
87
- sharedChunksNameCache.set(module, name);
88
- return name;
89
- },
90
- };
87
+ .substring(0, 16);
88
+ };
89
+ }
91
90
  webpackSplitChunks = {
92
91
  chunks: 'all',
93
92
  maxInitialRequests: 10,
@@ -1 +1 @@
1
- {"version":3,"file":"splitChunks.js","sourceRoot":"","sources":["../../../../../../../src/library/webpack/application/client/prod/optimization/splitChunks.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAGxB,4DAA4B;AAO5B,MAAM,qBAAqB,GAAG,IAAI,OAAO,EAAe,CAAC;AAEzD,qJAAqJ;AACrJ,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAE,cAAwB,EAAE,EAAE;IAC3E,MAAM,sBAAsB,GAAa,EAAE,CAAC;IAC5C,MAAM,wBAAwB,GAAG,IAAI,GAAG,EAAU,CAAC;IAEnD,iDAAiD;IACjD,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAE,YAAoB,EAAE,EAAE;QACnE,IAAI;YACF,IAAI,wBAAwB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;gBAC7C,OAAO;aACR;YAED,wBAAwB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAE1C,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,WAAW,eAAe,EAAE;gBACrE,KAAK,EAAE,CAAC,YAAY,CAAC;aACtB,CAAC,CAAC;YAEH,6FAA6F;YAC7F,0EAA0E;YAC1E,eAAe;YACf,0EAA0E;YAC1E,2EAA2E;YAC3E,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;YAEpD,yFAAyF;YACzF,IAAI,sBAAsB,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAAE,OAAO;YACvD,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEvC,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,YAAY,IAAI,EAAE,CAAC;YAEjE,KAAK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B;wBAC7C,QAAQ,EAAE,EAAE;qBACb;iBACF;aACF,CAAC;YACF,MAAM;SACP;KACF;IAED,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC;IAErC,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,KAAI,kBAAkB,EAAE;QAC7C,kBAAkB,CAAC,WAAW,CAAC,GAAG,GAAG;YACnC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,4GAA4G;YAClH,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,EAAE;SACb,CAAC;KACH;IAED,MAAM,CAAC,YAAY;SAChB,WAAW,CAAC,kBAAkB,CAAC;QAChC,8JAA8J;SAC7J,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE5B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA1GS,QAAA,iBAAiB,qBA0G1B"}
1
+ {"version":3,"file":"splitChunks.js","sourceRoot":"","sources":["../../../../../../../src/library/webpack/application/client/prod/optimization/splitChunks.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAGxB,4DAA4B;AAO5B,qJAAqJ;AACrJ,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAE,cAAwB,EAAE,EAAE;IAC3E,MAAM,sBAAsB,GAAa,EAAE,CAAC;IAC5C,MAAM,wBAAwB,GAAG,IAAI,GAAG,EAAU,CAAC;IAEnD,iDAAiD;IACjD,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAE,YAAoB,EAAE,EAAE;QACnE,IAAI;YACF,IAAI,wBAAwB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;gBAC7C,OAAO;aACR;YAED,wBAAwB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAE1C,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,WAAW,eAAe,EAAE;gBACrE,KAAK,EAAE,CAAC,YAAY,CAAC;aACtB,CAAC,CAAC;YAE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AAM;iBACP;aACF,CAAC;YACF,MAAM;SACP;QACD,KAAK,aAAa,CAAC,CAAC;YAClB,kBAAkB,GAAG;gBACnB,WAAW,EAAE;oBACX,OAAO,EAAE,KAAK;oBACd,cAAc,EAAE,KAAK;oBACrB,eAAe;oBACf,OAAO,EAAE;wBACP,IAAI,EAAE,cAAc;wBACpB,SAAS,EAAE,WAAW,CAAC,sBAAsB;wBAC7C,QAAQ,EAAE,EAAE;qBACb;iBACF;aACF,CAAC;YACF,MAAM;SACP;KACF;IAED,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC;IAErC,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,KAAI,kBAAkB,EAAE;QAC7C,kBAAkB,CAAC,WAAW,CAAC,GAAG,GAAG;YACnC,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,4GAA4G;YAClH,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,EAAE;SACb,CAAC;KACH;IAED,MAAM,CAAC,YAAY;SAChB,WAAW,CAAC,kBAAkB,CAAC;QAChC,8JAA8J;SAC7J,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE5B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAxGS,QAAA,iBAAiB,qBAwG1B"}
@@ -1,3 +1,90 @@
1
1
  import type { Configuration } from 'webpack';
2
2
  export declare const DEFAULT_STATS_OPTIONS: Configuration['stats'];
3
3
  export declare const DEFAULT_STATS_FIELDS: string[];
4
+ export declare const DEV_STATS_OPTIONS: {
5
+ chunks: boolean;
6
+ all?: boolean;
7
+ assets?: boolean;
8
+ assetsSort?: string;
9
+ assetsSpace?: number;
10
+ builtAt?: boolean;
11
+ cached?: boolean;
12
+ cachedAssets?: boolean;
13
+ cachedModules?: boolean;
14
+ children?: boolean;
15
+ chunkGroupAuxiliary?: boolean;
16
+ chunkGroupChildren?: boolean;
17
+ chunkGroupMaxAssets?: number;
18
+ chunkGroups?: boolean;
19
+ chunkModules?: boolean;
20
+ chunkModulesSpace?: number;
21
+ chunkOrigins?: boolean;
22
+ chunkRelations?: boolean;
23
+ chunksSort?: string;
24
+ colors?: boolean | {
25
+ bold?: string;
26
+ cyan?: string;
27
+ green?: string;
28
+ magenta?: string;
29
+ red?: string;
30
+ yellow?: string;
31
+ };
32
+ context?: string;
33
+ dependentModules?: boolean;
34
+ depth?: boolean;
35
+ entrypoints?: boolean | "auto";
36
+ env?: boolean;
37
+ errorDetails?: boolean | "auto";
38
+ errorStack?: boolean;
39
+ errors?: boolean;
40
+ errorsCount?: boolean;
41
+ errorsSpace?: number;
42
+ exclude?: string | boolean | RegExp | (string | RegExp | ((name: string, module: import("webpack").StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean))[] | ((name: string, module: import("webpack").StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean);
43
+ excludeAssets?: string | RegExp | (string | RegExp | ((name: string, asset: import("webpack").StatsAsset) => boolean))[] | ((name: string, asset: import("webpack").StatsAsset) => boolean);
44
+ excludeModules?: string | boolean | RegExp | (string | RegExp | ((name: string, module: import("webpack").StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean))[] | ((name: string, module: import("webpack").StatsModule, type: "module" | "chunk" | "root-of-chunk" | "nested") => boolean);
45
+ groupAssetsByChunk?: boolean;
46
+ groupAssetsByEmitStatus?: boolean;
47
+ groupAssetsByExtension?: boolean;
48
+ groupAssetsByInfo?: boolean;
49
+ groupAssetsByPath?: boolean;
50
+ groupModulesByAttributes?: boolean;
51
+ groupModulesByCacheStatus?: boolean;
52
+ groupModulesByExtension?: boolean;
53
+ groupModulesByLayer?: boolean;
54
+ groupModulesByPath?: boolean;
55
+ groupModulesByType?: boolean;
56
+ groupReasonsByOrigin?: boolean;
57
+ hash?: boolean;
58
+ ids?: boolean;
59
+ logging?: boolean | "error" | "none" | "verbose" | "warn" | "info" | "log";
60
+ loggingDebug?: string | boolean | RegExp | (string | RegExp | ((value: string) => boolean))[] | ((value: string) => boolean);
61
+ loggingTrace?: boolean;
62
+ moduleAssets?: boolean;
63
+ moduleTrace?: boolean;
64
+ modules?: boolean;
65
+ modulesSort?: string;
66
+ modulesSpace?: number;
67
+ nestedModules?: boolean;
68
+ nestedModulesSpace?: number;
69
+ optimizationBailout?: boolean;
70
+ orphanModules?: boolean;
71
+ outputPath?: boolean;
72
+ performance?: boolean;
73
+ preset?: string | boolean;
74
+ providedExports?: boolean;
75
+ publicPath?: boolean;
76
+ reasons?: boolean;
77
+ reasonsSpace?: number;
78
+ relatedAssets?: boolean;
79
+ runtime?: boolean;
80
+ runtimeModules?: boolean;
81
+ source?: boolean;
82
+ timings?: boolean;
83
+ usedExports?: boolean;
84
+ version?: boolean;
85
+ warnings?: boolean;
86
+ warningsCount?: boolean;
87
+ warningsFilter?: string | RegExp | (string | RegExp | ((warning: import("webpack").StatsError, value: string) => boolean))[] | ((warning: import("webpack").StatsError, value: string) => boolean);
88
+ warningsSpace?: number;
89
+ };
90
+ export declare const DEV_STATS_FIELDS: string[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_STATS_FIELDS = exports.DEFAULT_STATS_OPTIONS = void 0;
3
+ exports.DEV_STATS_FIELDS = exports.DEV_STATS_OPTIONS = exports.DEFAULT_STATS_FIELDS = exports.DEFAULT_STATS_OPTIONS = void 0;
4
4
  exports.DEFAULT_STATS_OPTIONS = {
5
5
  all: false,
6
6
  publicPath: true,
@@ -17,4 +17,6 @@ exports.DEFAULT_STATS_FIELDS = [
17
17
  'namedChunkGroups',
18
18
  'entrypoints',
19
19
  ];
20
+ exports.DEV_STATS_OPTIONS = Object.assign(Object.assign({}, exports.DEFAULT_STATS_OPTIONS), { chunks: true });
21
+ exports.DEV_STATS_FIELDS = [...exports.DEFAULT_STATS_FIELDS, 'chunks'];
20
22
  //# sourceMappingURL=stats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/library/webpack/constants/stats.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAA2B;IAC3D,GAAG,EAAE,KAAK;IAEV,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACjB,GAAG,EAAE,IAAI;IACT,WAAW,EAAE,IAAI,EAAE,mDAAmD;CACvE,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC5C,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,aAAa;CACd,CAAC"}
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/library/webpack/constants/stats.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAA2B;IAC3D,GAAG,EAAE,KAAK;IAEV,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;IACjB,GAAG,EAAE,IAAI;IACT,WAAW,EAAE,IAAI,EAAE,mDAAmD;CACvE,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC5C,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,aAAa;CACd,CAAC;AAEW,QAAA,iBAAiB,mCACzB,6BAAqB,KACxB,MAAM,EAAE,IAAI,IACZ;AAEW,QAAA,gBAAgB,GAAG,CAAC,GAAG,4BAAoB,EAAE,QAAQ,CAAC,CAAC"}
@@ -1,12 +1,8 @@
1
1
  import type Config from 'webpack-chain';
2
+ import type { Config as SvgoConfig } from 'svgo';
2
3
  import type { ConfigManager } from '../../../config/configManager';
3
4
  import type { CliConfigEntry } from '../../../typings/configEntry/cli';
4
5
  export declare const addSvgrLoader: (configManager: ConfigManager<CliConfigEntry>, config: Config, svgoOptions: Record<string, any>) => void;
5
- export declare const getSvgoOptions: (configManager: ConfigManager<CliConfigEntry>) => {
6
- configFile: boolean;
7
- plugins: {
8
- [x: string]: any;
9
- name: string;
10
- active: boolean;
11
- }[];
6
+ export declare const getSvgoOptions: (configManager: ConfigManager<CliConfigEntry>) => SvgoConfig & {
7
+ configFile?: boolean;
12
8
  };
@@ -22,12 +22,13 @@ const getSvgoOptions = (configManager) => {
22
22
  configFile: false,
23
23
  plugins: (_b = (_a = configManager.svgo) === null || _a === void 0 ? void 0 : _a.plugins) !== null && _b !== void 0 ? _b : [
24
24
  {
25
- name: 'cleanupIds',
26
- active: false,
27
- },
28
- {
29
- name: 'collapseGroups',
30
- active: false,
25
+ name: 'preset-default',
26
+ params: {
27
+ overrides: {
28
+ cleanupIds: false,
29
+ collapseGroups: false,
30
+ },
31
+ },
31
32
  },
32
33
  ],
33
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../src/library/webpack/utils/files.ts"],"names":[],"mappings":";;;AAGA,6CAAwE;AAEjE,MAAM,aAAa,GAAG,CAC3B,aAA4C,EAC5C,MAAc,EACd,WAAgC,EAChC,EAAE;IACF,MAAM,gBAAgB,GAAG,IAAA,gCAAmB,EAAC,aAAa,CAAC,CAAC;IAC5D,4FAA4F;IAC5F,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM;SAC7B,IAAI,CAAC,MAAM,CAAC;SACZ,IAAI,CAAC,QAAQ,CAAC;QACf,4CAA4C;SAC3C,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC;SAC7B,GAAG,CAAC,iBAAiB,CAAC;SACtB,KAAK,CACJ,IAAA,gCAAmB,EAAC,aAAa,kCAC5B,gBAAgB,KACnB,UAAU,EAAE,IAAI,IAChB,CACH;SACA,GAAG,EAAE,CAAC;IAET,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;A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ACL,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,MAAC,MAAA,aAAa,CAAC,IAAI,0CAAE,OAAiC,mCAAI;YACjE;gBACE,IAAI,EAAE,gBAAgB;gBACtB,MAAM,EAAE;oBACN,SAAS,EAAE;wBACT,UAAU,EAAE,KAAK;wBACjB,cAAc,EAAE,KAAK;qBACtB;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,cAAc,kBAiBzB"}
@@ -1015,19 +1015,27 @@
1015
1015
  "type": "object",
1016
1016
  "properties": {
1017
1017
  "plugins": {
1018
- "title": "svgo plugins",
1018
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1019
1019
  "type": "array",
1020
1020
  "items": {
1021
- "type": "object",
1022
- "properties": {
1023
- "name": {
1024
- "type": "string"
1021
+ "anyOf": [
1022
+ {
1023
+ "type": "object",
1024
+ "properties": {
1025
+ "name": {
1026
+ "type": "string"
1027
+ },
1028
+ "params": {
1029
+ "type": "object",
1030
+ "additionalProperties": false
1031
+ }
1032
+ },
1033
+ "additionalProperties": false
1025
1034
  },
1026
- "active": {
1027
- "type": "boolean"
1035
+ {
1036
+ "type": "string"
1028
1037
  }
1029
- },
1030
- "additionalProperties": false
1038
+ ]
1031
1039
  }
1032
1040
  }
1033
1041
  },
@@ -1133,23 +1141,23 @@
1133
1141
  "dotAll": {
1134
1142
  "type": "boolean"
1135
1143
  },
1136
- "__@match@8220": {
1144
+ "__@match@8221": {
1137
1145
  "type": "object",
1138
1146
  "additionalProperties": false
1139
1147
  },
1140
- "__@replace@8222": {
1148
+ "__@replace@8223": {
1141
1149
  "type": "object",
1142
1150
  "additionalProperties": false
1143
1151
  },
1144
- "__@search@8225": {
1152
+ "__@search@8226": {
1145
1153
  "type": "object",
1146
1154
  "additionalProperties": false
1147
1155
  },
1148
- "__@split@8227": {
1156
+ "__@split@8228": {
1149
1157
  "type": "object",
1150
1158
  "additionalProperties": false
1151
1159
  },
1152
- "__@matchAll@8229": {
1160
+ "__@matchAll@8230": {
1153
1161
  "type": "object",
1154
1162
  "additionalProperties": false
1155
1163
  }
@@ -1668,19 +1676,27 @@
1668
1676
  "type": "object",
1669
1677
  "properties": {
1670
1678
  "plugins": {
1671
- "title": "svgo plugins",
1679
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1672
1680
  "type": "array",
1673
1681
  "items": {
1674
- "type": "object",
1675
- "properties": {
1676
- "name": {
1677
- "type": "string"
1682
+ "anyOf": [
1683
+ {
1684
+ "type": "object",
1685
+ "properties": {
1686
+ "name": {
1687
+ "type": "string"
1688
+ },
1689
+ "params": {
1690
+ "type": "object",
1691
+ "additionalProperties": false
1692
+ }
1693
+ },
1694
+ "additionalProperties": false
1678
1695
  },
1679
- "active": {
1680
- "type": "boolean"
1696
+ {
1697
+ "type": "string"
1681
1698
  }
1682
- },
1683
- "additionalProperties": false
1699
+ ]
1684
1700
  }
1685
1701
  }
1686
1702
  },
@@ -1786,23 +1802,23 @@
1786
1802
  "dotAll": {
1787
1803
  "type": "boolean"
1788
1804
  },
1789
- "__@match@8220": {
1805
+ "__@match@8221": {
1790
1806
  "type": "object",
1791
1807
  "additionalProperties": false
1792
1808
  },
1793
- "__@replace@8222": {
1809
+ "__@replace@8223": {
1794
1810
  "type": "object",
1795
1811
  "additionalProperties": false
1796
1812
  },
1797
- "__@search@8225": {
1813
+ "__@search@8226": {
1798
1814
  "type": "object",
1799
1815
  "additionalProperties": false
1800
1816
  },
1801
- "__@split@8227": {
1817
+ "__@split@8228": {
1802
1818
  "type": "object",
1803
1819
  "additionalProperties": false
1804
1820
  },
1805
- "__@matchAll@8229": {
1821
+ "__@matchAll@8230": {
1806
1822
  "type": "object",
1807
1823
  "additionalProperties": false
1808
1824
  }
@@ -2321,19 +2337,27 @@
2321
2337
  "type": "object",
2322
2338
  "properties": {
2323
2339
  "plugins": {
2324
- "title": "svgo plugins",
2340
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
2325
2341
  "type": "array",
2326
2342
  "items": {
2327
- "type": "object",
2328
- "properties": {
2329
- "name": {
2330
- "type": "string"
2343
+ "anyOf": [
2344
+ {
2345
+ "type": "object",
2346
+ "properties": {
2347
+ "name": {
2348
+ "type": "string"
2349
+ },
2350
+ "params": {
2351
+ "type": "object",
2352
+ "additionalProperties": false
2353
+ }
2354
+ },
2355
+ "additionalProperties": false
2331
2356
  },
2332
- "active": {
2333
- "type": "boolean"
2357
+ {
2358
+ "type": "string"
2334
2359
  }
2335
- },
2336
- "additionalProperties": false
2360
+ ]
2337
2361
  }
2338
2362
  }
2339
2363
  },
@@ -2439,23 +2463,23 @@
2439
2463
  "dotAll": {
2440
2464
  "type": "boolean"
2441
2465
  },
2442
- "__@match@8220": {
2466
+ "__@match@8221": {
2443
2467
  "type": "object",
2444
2468
  "additionalProperties": false
2445
2469
  },
2446
- "__@replace@8222": {
2470
+ "__@replace@8223": {
2447
2471
  "type": "object",
2448
2472
  "additionalProperties": false
2449
2473
  },
2450
- "__@search@8225": {
2474
+ "__@search@8226": {
2451
2475
  "type": "object",
2452
2476
  "additionalProperties": false
2453
2477
  },
2454
- "__@split@8227": {
2478
+ "__@split@8228": {
2455
2479
  "type": "object",
2456
2480
  "additionalProperties": false
2457
2481
  },
2458
- "__@matchAll@8229": {
2482
+ "__@matchAll@8230": {
2459
2483
  "type": "object",
2460
2484
  "additionalProperties": false
2461
2485
  }
@@ -1,6 +1,10 @@
1
1
  import type { Configuration } from 'webpack';
2
2
  import type { DeduplicateStrategy } from '@tinkoff/webpack-dedupe-plugin';
3
3
  import type { ConfigEntry, OverridableOption } from './common';
4
+ type SimplifiedSvgoConfig = string | {
5
+ name: string;
6
+ params: Record<string, any>;
7
+ };
4
8
  type Notifications = {
5
9
  /**
6
10
  * @title Defines when success notifications are shown
@@ -149,13 +153,10 @@ export interface CliConfigEntry extends ConfigEntry {
149
153
  */
150
154
  svgo?: {
151
155
  /**
152
- * @title svgo plugins
156
+ * @title svgo plugins, you can find full types in PluginConfig inside `svgo` source code,
157
+ * but this interface too complex and heavy for schema
153
158
  */
154
- plugins?: Array<{
155
- name: string;
156
- active: boolean;
157
- [key: string]: any;
158
- }>;
159
+ plugins?: SimplifiedSvgoConfig[];
159
160
  };
160
161
  /**
161
162
  * @title Settings for image-webpack-loader
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/cli",
3
- "version": "2.130.10",
3
+ "version": "2.132.0",
4
4
  "description": "Cli инструмент для сборки и запуска приложений",
5
5
  "files": [
6
6
  "src",
@@ -59,7 +59,7 @@
59
59
  "@module-federation/node": "^0.15.1",
60
60
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
61
61
  "@sentry/node": "^6.2.5",
62
- "@svgr/webpack": "^6.5.1",
62
+ "@svgr/webpack": "^8.1.0",
63
63
  "@tinkoff/browserslist-config": "0.2.7",
64
64
  "@tinkoff/dippy": "0.8.15",
65
65
  "@tinkoff/is-modern-lib": "2.0.11",
@@ -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.4",
74
- "@tramvai/react": "2.130.10",
74
+ "@tramvai/react": "2.132.0",
75
75
  "@tramvai/tools-check-versions": "0.4.17",
76
76
  "@tramvai/tools-migrate": "0.6.21",
77
77
  "ajv": "^6.12.6",
@@ -91,7 +91,7 @@
91
91
  "core-js": "^3.0.0",
92
92
  "css-class-generator": "^2.0.0",
93
93
  "css-loader": "^6.7.1",
94
- "css-minimizer-webpack-plugin": "^4.2.2",
94
+ "css-minimizer-webpack-plugin": "^5.0.1",
95
95
  "csso-webpack-plugin": "2.0.0-beta.3",
96
96
  "death": "^1.1.0",
97
97
  "detect-port": "^1.5.1",
@@ -183,7 +183,6 @@
183
183
  "@types/rimraf": "^3.0.2",
184
184
  "@types/semver": "^7.3.12",
185
185
  "@types/stoppable": "^1.1.1",
186
- "@types/svgo": "^1.3.6",
187
186
  "@types/universal-analytics": "^0.4.5",
188
187
  "@types/webpack": ">=5.28",
189
188
  "@types/webpack-dev-middleware": "^5.0.2",
package/schema.json CHANGED
@@ -1036,19 +1036,27 @@
1036
1036
  "type": "object",
1037
1037
  "properties": {
1038
1038
  "plugins": {
1039
- "title": "svgo plugins",
1039
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1040
1040
  "type": "array",
1041
1041
  "items": {
1042
- "type": "object",
1043
- "properties": {
1044
- "name": {
1045
- "type": "string"
1042
+ "anyOf": [
1043
+ {
1044
+ "type": "object",
1045
+ "properties": {
1046
+ "name": {
1047
+ "type": "string"
1048
+ },
1049
+ "params": {
1050
+ "type": "object",
1051
+ "additionalProperties": false
1052
+ }
1053
+ },
1054
+ "additionalProperties": false
1046
1055
  },
1047
- "active": {
1048
- "type": "boolean"
1056
+ {
1057
+ "type": "string"
1049
1058
  }
1050
- },
1051
- "additionalProperties": false
1059
+ ]
1052
1060
  }
1053
1061
  }
1054
1062
  },
@@ -1154,23 +1162,23 @@
1154
1162
  "dotAll": {
1155
1163
  "type": "boolean"
1156
1164
  },
1157
- "__@match@8220": {
1165
+ "__@match@8221": {
1158
1166
  "type": "object",
1159
1167
  "additionalProperties": false
1160
1168
  },
1161
- "__@replace@8222": {
1169
+ "__@replace@8223": {
1162
1170
  "type": "object",
1163
1171
  "additionalProperties": false
1164
1172
  },
1165
- "__@search@8225": {
1173
+ "__@search@8226": {
1166
1174
  "type": "object",
1167
1175
  "additionalProperties": false
1168
1176
  },
1169
- "__@split@8227": {
1177
+ "__@split@8228": {
1170
1178
  "type": "object",
1171
1179
  "additionalProperties": false
1172
1180
  },
1173
- "__@matchAll@8229": {
1181
+ "__@matchAll@8230": {
1174
1182
  "type": "object",
1175
1183
  "additionalProperties": false
1176
1184
  }
@@ -1697,19 +1705,27 @@
1697
1705
  "type": "object",
1698
1706
  "properties": {
1699
1707
  "plugins": {
1700
- "title": "svgo plugins",
1708
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1701
1709
  "type": "array",
1702
1710
  "items": {
1703
- "type": "object",
1704
- "properties": {
1705
- "name": {
1706
- "type": "string"
1711
+ "anyOf": [
1712
+ {
1713
+ "type": "object",
1714
+ "properties": {
1715
+ "name": {
1716
+ "type": "string"
1717
+ },
1718
+ "params": {
1719
+ "type": "object",
1720
+ "additionalProperties": false
1721
+ }
1722
+ },
1723
+ "additionalProperties": false
1707
1724
  },
1708
- "active": {
1709
- "type": "boolean"
1725
+ {
1726
+ "type": "string"
1710
1727
  }
1711
- },
1712
- "additionalProperties": false
1728
+ ]
1713
1729
  }
1714
1730
  }
1715
1731
  },
@@ -1815,23 +1831,23 @@
1815
1831
  "dotAll": {
1816
1832
  "type": "boolean"
1817
1833
  },
1818
- "__@match@8220": {
1834
+ "__@match@8221": {
1819
1835
  "type": "object",
1820
1836
  "additionalProperties": false
1821
1837
  },
1822
- "__@replace@8222": {
1838
+ "__@replace@8223": {
1823
1839
  "type": "object",
1824
1840
  "additionalProperties": false
1825
1841
  },
1826
- "__@search@8225": {
1842
+ "__@search@8226": {
1827
1843
  "type": "object",
1828
1844
  "additionalProperties": false
1829
1845
  },
1830
- "__@split@8227": {
1846
+ "__@split@8228": {
1831
1847
  "type": "object",
1832
1848
  "additionalProperties": false
1833
1849
  },
1834
- "__@matchAll@8229": {
1850
+ "__@matchAll@8230": {
1835
1851
  "type": "object",
1836
1852
  "additionalProperties": false
1837
1853
  }
@@ -2358,19 +2374,27 @@
2358
2374
  "type": "object",
2359
2375
  "properties": {
2360
2376
  "plugins": {
2361
- "title": "svgo plugins",
2377
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
2362
2378
  "type": "array",
2363
2379
  "items": {
2364
- "type": "object",
2365
- "properties": {
2366
- "name": {
2367
- "type": "string"
2380
+ "anyOf": [
2381
+ {
2382
+ "type": "object",
2383
+ "properties": {
2384
+ "name": {
2385
+ "type": "string"
2386
+ },
2387
+ "params": {
2388
+ "type": "object",
2389
+ "additionalProperties": false
2390
+ }
2391
+ },
2392
+ "additionalProperties": false
2368
2393
  },
2369
- "active": {
2370
- "type": "boolean"
2394
+ {
2395
+ "type": "string"
2371
2396
  }
2372
- },
2373
- "additionalProperties": false
2397
+ ]
2374
2398
  }
2375
2399
  }
2376
2400
  },
@@ -2476,23 +2500,23 @@
2476
2500
  "dotAll": {
2477
2501
  "type": "boolean"
2478
2502
  },
2479
- "__@match@8220": {
2503
+ "__@match@8221": {
2480
2504
  "type": "object",
2481
2505
  "additionalProperties": false
2482
2506
  },
2483
- "__@replace@8222": {
2507
+ "__@replace@8223": {
2484
2508
  "type": "object",
2485
2509
  "additionalProperties": false
2486
2510
  },
2487
- "__@search@8225": {
2511
+ "__@search@8226": {
2488
2512
  "type": "object",
2489
2513
  "additionalProperties": false
2490
2514
  },
2491
- "__@split@8227": {
2515
+ "__@split@8228": {
2492
2516
  "type": "object",
2493
2517
  "additionalProperties": false
2494
2518
  },
2495
- "__@matchAll@8229": {
2519
+ "__@matchAll@8230": {
2496
2520
  "type": "object",
2497
2521
  "additionalProperties": false
2498
2522
  }
@@ -18,13 +18,18 @@ import postcssAssets from '../../blocks/postcssAssets';
18
18
  import nodeClient from '../../blocks/nodeClient';
19
19
  import { pagesResolve } from '../../blocks/pagesResolve';
20
20
  import { configToEnv } from '../../blocks/configToEnv';
21
- import { DEFAULT_STATS_OPTIONS, DEFAULT_STATS_FIELDS } from '../../constants/stats';
21
+ import {
22
+ DEFAULT_STATS_OPTIONS,
23
+ DEFAULT_STATS_FIELDS,
24
+ DEV_STATS_OPTIONS,
25
+ DEV_STATS_FIELDS,
26
+ } from '../../constants/stats';
22
27
  import { pwaBlock } from '../../blocks/pwa/client';
23
28
  import type { ModuleFederationFixRangeOptions } from '../../plugins/ModuleFederationFixRange';
24
29
  import { ModuleFederationFixRange } from '../../plugins/ModuleFederationFixRange';
25
30
 
26
31
  export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config: Config) => {
27
- const { polyfill, fileSystemPages, shared } = configManager;
32
+ const { polyfill, fileSystemPages, shared, env } = configManager;
28
33
 
29
34
  const portal = path.resolve(configManager.rootDir, `packages/${process.env.APP_ID}/portal.js`);
30
35
  const polyfillPath = path.resolve(configManager.rootDir, polyfill ?? 'src/polyfill');
@@ -65,8 +70,8 @@ export default (configManager: ConfigManager<ApplicationConfigEntry>) => (config
65
70
  .use(StatsWriterPlugin, [
66
71
  {
67
72
  filename: configManager.modern ? 'stats.modern.json' : 'stats.json',
68
- stats: DEFAULT_STATS_OPTIONS,
69
- fields: DEFAULT_STATS_FIELDS,
73
+ stats: env === 'development' ? DEV_STATS_OPTIONS : DEFAULT_STATS_OPTIONS,
74
+ fields: env === 'development' ? DEV_STATS_FIELDS : DEFAULT_STATS_FIELDS,
70
75
  },
71
76
  ])
72
77
  .end()
@@ -8,8 +8,6 @@ import type { ApplicationConfigEntry } from '../../../../../../typings/configEnt
8
8
 
9
9
  import type { SplitChunksOptions } from '../../../../types/webpack';
10
10
 
11
- const sharedChunksNameCache = new WeakMap<any, string>();
12
-
13
11
  // based on [nextjs code](https://github.com/vercel/next.js/blob/aaeb349ce3e8c4c3435a43a29af4379266818e7b/packages/next/build/webpack-config.ts#L707)
14
12
  const resolveFrameworksPaths = (rootDir: string, frameworksList: string[]) => {
15
13
  const topLevelFrameworkPaths: string[] = [];
@@ -94,12 +92,14 @@ export const splitChunksConfig =
94
92
  minSize: splitChunks.granularChunksMinSize,
95
93
  reuseExistingChunk: true,
96
94
  priority: 30,
97
- name: (module: webpack.Module, chunks: webpack.Chunk[] = []) => {
98
- if (sharedChunksNameCache.has(module)) {
99
- return sharedChunksNameCache.get(module);
100
- }
95
+ };
101
96
 
102
- const name = crypto
97
+ // too slow for development, default names is fast, but have one problem -
98
+ // we can find shared chunk filenames only in `chunks` stats property, not in `assetsByChunkName`
99
+ // https://github.com/webpack/webpack/issues/14433#issuecomment-938468513
100
+ if (env === 'production') {
101
+ shared.name = (module: webpack.Module, chunks: webpack.Chunk[] = []) => {
102
+ return crypto
103
103
  .createHash('sha1')
104
104
  .update(
105
105
  chunks.reduce((acc: string, chunk: webpack.Chunk) => {
@@ -107,13 +107,9 @@ export const splitChunksConfig =
107
107
  }, '')
108
108
  )
109
109
  .digest('hex')
110
- .substring(0, 8);
111
-
112
- sharedChunksNameCache.set(module, name);
113
-
114
- return name;
115
- },
116
- };
110
+ .substring(0, 16);
111
+ };
112
+ }
117
113
 
118
114
  webpackSplitChunks = {
119
115
  chunks: 'all',
@@ -18,3 +18,10 @@ export const DEFAULT_STATS_FIELDS: string[] = [
18
18
  'namedChunkGroups',
19
19
  'entrypoints',
20
20
  ];
21
+
22
+ export const DEV_STATS_OPTIONS = {
23
+ ...DEFAULT_STATS_OPTIONS,
24
+ chunks: true, // нужно, чтобы получить название файлов для shared чанков в development режиме
25
+ };
26
+
27
+ export const DEV_STATS_FIELDS = [...DEFAULT_STATS_FIELDS, 'chunks'];
@@ -1,4 +1,5 @@
1
1
  import type Config from 'webpack-chain';
2
+ import type { PluginConfig, Config as SvgoConfig } from 'svgo';
2
3
  import type { ConfigManager } from '../../../config/configManager';
3
4
  import type { CliConfigEntry } from '../../../typings/configEntry/cli';
4
5
  import { addTranspilerLoader, getTranspilerConfig } from './transpiler';
@@ -27,17 +28,20 @@ export const addSvgrLoader = (
27
28
  svgrConfig.use('svgr').loader('@svgr/webpack').options({ babel: false, svgo: svgoOptions }).end();
28
29
  };
29
30
 
30
- export const getSvgoOptions = (configManager: ConfigManager<CliConfigEntry>) => {
31
+ export const getSvgoOptions = (
32
+ configManager: ConfigManager<CliConfigEntry>
33
+ ): SvgoConfig & { configFile?: boolean } => {
31
34
  return {
32
35
  configFile: false,
33
- plugins: configManager.svgo?.plugins ?? [
36
+ plugins: (configManager.svgo?.plugins as any as PluginConfig[]) ?? [
34
37
  {
35
- name: 'cleanupIds',
36
- active: false,
37
- },
38
- {
39
- name: 'collapseGroups',
40
- active: false,
38
+ name: 'preset-default',
39
+ params: {
40
+ overrides: {
41
+ cleanupIds: false,
42
+ collapseGroups: false,
43
+ },
44
+ },
41
45
  },
42
46
  ],
43
47
  };
@@ -1015,19 +1015,27 @@
1015
1015
  "type": "object",
1016
1016
  "properties": {
1017
1017
  "plugins": {
1018
- "title": "svgo plugins",
1018
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1019
1019
  "type": "array",
1020
1020
  "items": {
1021
- "type": "object",
1022
- "properties": {
1023
- "name": {
1024
- "type": "string"
1021
+ "anyOf": [
1022
+ {
1023
+ "type": "object",
1024
+ "properties": {
1025
+ "name": {
1026
+ "type": "string"
1027
+ },
1028
+ "params": {
1029
+ "type": "object",
1030
+ "additionalProperties": false
1031
+ }
1032
+ },
1033
+ "additionalProperties": false
1025
1034
  },
1026
- "active": {
1027
- "type": "boolean"
1035
+ {
1036
+ "type": "string"
1028
1037
  }
1029
- },
1030
- "additionalProperties": false
1038
+ ]
1031
1039
  }
1032
1040
  }
1033
1041
  },
@@ -1133,23 +1141,23 @@
1133
1141
  "dotAll": {
1134
1142
  "type": "boolean"
1135
1143
  },
1136
- "__@match@8220": {
1144
+ "__@match@8221": {
1137
1145
  "type": "object",
1138
1146
  "additionalProperties": false
1139
1147
  },
1140
- "__@replace@8222": {
1148
+ "__@replace@8223": {
1141
1149
  "type": "object",
1142
1150
  "additionalProperties": false
1143
1151
  },
1144
- "__@search@8225": {
1152
+ "__@search@8226": {
1145
1153
  "type": "object",
1146
1154
  "additionalProperties": false
1147
1155
  },
1148
- "__@split@8227": {
1156
+ "__@split@8228": {
1149
1157
  "type": "object",
1150
1158
  "additionalProperties": false
1151
1159
  },
1152
- "__@matchAll@8229": {
1160
+ "__@matchAll@8230": {
1153
1161
  "type": "object",
1154
1162
  "additionalProperties": false
1155
1163
  }
@@ -1668,19 +1676,27 @@
1668
1676
  "type": "object",
1669
1677
  "properties": {
1670
1678
  "plugins": {
1671
- "title": "svgo plugins",
1679
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
1672
1680
  "type": "array",
1673
1681
  "items": {
1674
- "type": "object",
1675
- "properties": {
1676
- "name": {
1677
- "type": "string"
1682
+ "anyOf": [
1683
+ {
1684
+ "type": "object",
1685
+ "properties": {
1686
+ "name": {
1687
+ "type": "string"
1688
+ },
1689
+ "params": {
1690
+ "type": "object",
1691
+ "additionalProperties": false
1692
+ }
1693
+ },
1694
+ "additionalProperties": false
1678
1695
  },
1679
- "active": {
1680
- "type": "boolean"
1696
+ {
1697
+ "type": "string"
1681
1698
  }
1682
- },
1683
- "additionalProperties": false
1699
+ ]
1684
1700
  }
1685
1701
  }
1686
1702
  },
@@ -1786,23 +1802,23 @@
1786
1802
  "dotAll": {
1787
1803
  "type": "boolean"
1788
1804
  },
1789
- "__@match@8220": {
1805
+ "__@match@8221": {
1790
1806
  "type": "object",
1791
1807
  "additionalProperties": false
1792
1808
  },
1793
- "__@replace@8222": {
1809
+ "__@replace@8223": {
1794
1810
  "type": "object",
1795
1811
  "additionalProperties": false
1796
1812
  },
1797
- "__@search@8225": {
1813
+ "__@search@8226": {
1798
1814
  "type": "object",
1799
1815
  "additionalProperties": false
1800
1816
  },
1801
- "__@split@8227": {
1817
+ "__@split@8228": {
1802
1818
  "type": "object",
1803
1819
  "additionalProperties": false
1804
1820
  },
1805
- "__@matchAll@8229": {
1821
+ "__@matchAll@8230": {
1806
1822
  "type": "object",
1807
1823
  "additionalProperties": false
1808
1824
  }
@@ -2321,19 +2337,27 @@
2321
2337
  "type": "object",
2322
2338
  "properties": {
2323
2339
  "plugins": {
2324
- "title": "svgo plugins",
2340
+ "title": "svgo plugins, you can find full types in PluginConfig inside `svgo` source code,\nbut this interface too complex and heavy for schema",
2325
2341
  "type": "array",
2326
2342
  "items": {
2327
- "type": "object",
2328
- "properties": {
2329
- "name": {
2330
- "type": "string"
2343
+ "anyOf": [
2344
+ {
2345
+ "type": "object",
2346
+ "properties": {
2347
+ "name": {
2348
+ "type": "string"
2349
+ },
2350
+ "params": {
2351
+ "type": "object",
2352
+ "additionalProperties": false
2353
+ }
2354
+ },
2355
+ "additionalProperties": false
2331
2356
  },
2332
- "active": {
2333
- "type": "boolean"
2357
+ {
2358
+ "type": "string"
2334
2359
  }
2335
- },
2336
- "additionalProperties": false
2360
+ ]
2337
2361
  }
2338
2362
  }
2339
2363
  },
@@ -2439,23 +2463,23 @@
2439
2463
  "dotAll": {
2440
2464
  "type": "boolean"
2441
2465
  },
2442
- "__@match@8220": {
2466
+ "__@match@8221": {
2443
2467
  "type": "object",
2444
2468
  "additionalProperties": false
2445
2469
  },
2446
- "__@replace@8222": {
2470
+ "__@replace@8223": {
2447
2471
  "type": "object",
2448
2472
  "additionalProperties": false
2449
2473
  },
2450
- "__@search@8225": {
2474
+ "__@search@8226": {
2451
2475
  "type": "object",
2452
2476
  "additionalProperties": false
2453
2477
  },
2454
- "__@split@8227": {
2478
+ "__@split@8228": {
2455
2479
  "type": "object",
2456
2480
  "additionalProperties": false
2457
2481
  },
2458
- "__@matchAll@8229": {
2482
+ "__@matchAll@8230": {
2459
2483
  "type": "object",
2460
2484
  "additionalProperties": false
2461
2485
  }
@@ -2,6 +2,8 @@ import type { Configuration } from 'webpack';
2
2
  import type { DeduplicateStrategy } from '@tinkoff/webpack-dedupe-plugin';
3
3
  import type { ConfigEntry, OverridableOption } from './common';
4
4
 
5
+ type SimplifiedSvgoConfig = string | { name: string; params: Record<string, any> };
6
+
5
7
  type Notifications = {
6
8
  /**
7
9
  * @title Defines when success notifications are shown
@@ -161,13 +163,10 @@ export interface CliConfigEntry extends ConfigEntry {
161
163
  */
162
164
  svgo?: {
163
165
  /**
164
- * @title svgo plugins
166
+ * @title svgo plugins, you can find full types in PluginConfig inside `svgo` source code,
167
+ * but this interface too complex and heavy for schema
165
168
  */
166
- plugins?: Array<{
167
- name: string;
168
- active: boolean;
169
- [key: string]: any;
170
- }>;
169
+ plugins?: SimplifiedSvgoConfig[];
171
170
  };
172
171
 
173
172
  /**