@gravity-ui/app-builder 0.5.4 → 0.5.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.5](https://github.com/gravity-ui/app-builder/compare/v0.5.4...v0.5.5) (2023-07-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * statoscope can be configured ([#42](https://github.com/gravity-ui/app-builder/issues/42)) ([9a21979](https://github.com/gravity-ui/app-builder/commit/9a219798ad416811dfd6d448c9dfa4e330e0659c))
9
+
3
10
  ## [0.5.4](https://github.com/gravity-ui/app-builder/compare/v0.5.3...v0.5.4) (2023-07-06)
4
11
 
5
12
 
package/README.md CHANGED
@@ -213,6 +213,7 @@ With this `{rootDir}/src/ui/tsconfig.json`:
213
213
  - `true` — enable [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) plugin. Report generated to `dist/public/build/stats.html`
214
214
  - `statoscope` — enable [statoscope](https://github.com/statoscope/statoscope) plugin. Reports generated to `dist/public/build/stats.json` and `dist/public/build/report.json`
215
215
  - `reactProfiling` (`boolean`) — use react profiler API in production, this option also disable minimization. The API is required by React developers tools for profile.
216
+ - `statoscopeConfig` (`Options`) — `@statoscope/webpack-plugin` [configuration options](https://github.com/statoscope/statoscope/tree/master/packages/webpack-plugin#usage). Might be used to override the defaults. Requires `analyzeBundle: statoscope`.
216
217
  - `cdn` (`CdnUploadConfig | CdnUploadConfig[]`) - upload bundled client files to CDN.
217
218
  - `bucket` (`string`) — bucket name
218
219
  - `prefix` (`string`) — path to files inside the bucket
@@ -7,6 +7,7 @@ import type { ServerConfiguration } from 'webpack-dev-server';
7
7
  import type { Options as CircularDependenciesOptions } from 'circular-dependency-plugin';
8
8
  import type { Config as SvgrConfig } from '@svgr/core';
9
9
  import type { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
10
+ import type { Options as StatoscopeOptions } from '@statoscope/webpack-plugin';
10
11
  export interface Entities<T> {
11
12
  data: Record<string, T>;
12
13
  keys: string[];
@@ -125,6 +126,7 @@ export interface ClientConfig {
125
126
  entryFilter?: string[];
126
127
  excludeFromClean?: string[];
127
128
  analyzeBundle?: 'true' | 'statoscope';
129
+ statoscopeConfig?: StatoscopeOptions;
128
130
  reactProfiling?: boolean;
129
131
  /**
130
132
  * Disable react-refresh in dev mode
@@ -626,6 +626,7 @@ function configurePlugins(options) {
626
626
  }));
627
627
  }
628
628
  if (config.analyzeBundle === 'statoscope') {
629
+ const customStatoscopeConfig = config.statoscopeConfig || {};
629
630
  plugins.push(new webpack_plugin_1.default({
630
631
  saveReportTo: path_1.default.resolve(paths_1.default.appBuild, 'report.html'),
631
632
  saveStatsTo: path_1.default.resolve(paths_1.default.appBuild, 'stats.json'),
@@ -633,6 +634,7 @@ function configurePlugins(options) {
633
634
  statsOptions: {
634
635
  all: true,
635
636
  },
637
+ ...customStatoscopeConfig,
636
638
  }));
637
639
  }
638
640
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",