@gravity-ui/app-builder 0.5.3 → 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 +14 -0
- package/README.md +2 -1
- package/dist/common/models/index.d.ts +7 -0
- package/dist/common/webpack/config.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
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
|
+
|
|
10
|
+
## [0.5.4](https://github.com/gravity-ui/app-builder/compare/v0.5.3...v0.5.4) (2023-07-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **ForkTSCheckerWebpackPlugin:** allow overwrite config ([#40](https://github.com/gravity-ui/app-builder/issues/40)) ([7490647](https://github.com/gravity-ui/app-builder/commit/74906477d707973dc885b0050ecc018ad6e43a00))
|
|
16
|
+
|
|
3
17
|
## [0.5.3](https://github.com/gravity-ui/app-builder/compare/v0.5.2...v0.5.3) (2023-06-30)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -187,7 +187,7 @@ With this `{rootDir}/src/ui/tsconfig.json`:
|
|
|
187
187
|
- `svgr` (`SvgrConfig`) — svgr plugin options. [more](https://react-svgr.com/docs/options/)
|
|
188
188
|
- `entryFilter` (`string[]`) — filter used entrypoints.
|
|
189
189
|
- `excludeFromClean` (`string[]`) — do not clean provided paths before build.
|
|
190
|
-
- `
|
|
190
|
+
- `forkTsCheker` (`false | ForkTsCheckerWebpackPluginOptions`) - config for ForkTsCheckerWebpackPlugin [more](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#options). If `false`, ForkTsCheckerWebpackPlugin will be disabled.
|
|
191
191
|
|
|
192
192
|
##### Dev build
|
|
193
193
|
|
|
@@ -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
|
|
@@ -6,6 +6,8 @@ import type { Configuration, ResolveOptions, DefinePlugin } from 'webpack';
|
|
|
6
6
|
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
|
+
import type { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
|
|
10
|
+
import type { Options as StatoscopeOptions } from '@statoscope/webpack-plugin';
|
|
9
11
|
export interface Entities<T> {
|
|
10
12
|
data: Record<string, T>;
|
|
11
13
|
keys: string[];
|
|
@@ -124,6 +126,7 @@ export interface ClientConfig {
|
|
|
124
126
|
entryFilter?: string[];
|
|
125
127
|
excludeFromClean?: string[];
|
|
126
128
|
analyzeBundle?: 'true' | 'statoscope';
|
|
129
|
+
statoscopeConfig?: StatoscopeOptions;
|
|
127
130
|
reactProfiling?: boolean;
|
|
128
131
|
/**
|
|
129
132
|
* Disable react-refresh in dev mode
|
|
@@ -137,7 +140,11 @@ export interface ClientConfig {
|
|
|
137
140
|
* use new JSX Transform
|
|
138
141
|
*/
|
|
139
142
|
newJsxTransform?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated
|
|
145
|
+
* */
|
|
140
146
|
disableForkTsChecker?: boolean;
|
|
147
|
+
forkTsChecker?: false | ForkTsCheckerWebpackPluginOptions;
|
|
141
148
|
disableSourceMapGeneration?: boolean;
|
|
142
149
|
lazyCompilation?: boolean | LazyCompilationConfig;
|
|
143
150
|
polyfill?: {
|
|
@@ -585,8 +585,9 @@ function configurePlugins(options) {
|
|
|
585
585
|
}
|
|
586
586
|
plugins.push(new circular_dependency_plugin_1.default(circularPluginOptions));
|
|
587
587
|
}
|
|
588
|
-
if (!config.disableForkTsChecker) {
|
|
588
|
+
if (!config.disableForkTsChecker && config.forkTsChecker !== false) {
|
|
589
589
|
plugins.push(new fork_ts_checker_webpack_plugin_1.default({
|
|
590
|
+
...config.forkTsChecker,
|
|
590
591
|
typescript: {
|
|
591
592
|
typescriptPath: require.resolve((0, path_1.resolve)(paths_1.default.appNodeModules, 'typescript')),
|
|
592
593
|
configFile: (0, path_1.resolve)(paths_1.default.app, 'src/ui/tsconfig.json'),
|
|
@@ -594,6 +595,7 @@ function configurePlugins(options) {
|
|
|
594
595
|
syntactic: true,
|
|
595
596
|
},
|
|
596
597
|
mode: 'write-references',
|
|
598
|
+
...config.forkTsChecker?.typescript,
|
|
597
599
|
},
|
|
598
600
|
}));
|
|
599
601
|
}
|
|
@@ -624,6 +626,7 @@ function configurePlugins(options) {
|
|
|
624
626
|
}));
|
|
625
627
|
}
|
|
626
628
|
if (config.analyzeBundle === 'statoscope') {
|
|
629
|
+
const customStatoscopeConfig = config.statoscopeConfig || {};
|
|
627
630
|
plugins.push(new webpack_plugin_1.default({
|
|
628
631
|
saveReportTo: path_1.default.resolve(paths_1.default.appBuild, 'report.html'),
|
|
629
632
|
saveStatsTo: path_1.default.resolve(paths_1.default.appBuild, 'stats.json'),
|
|
@@ -631,6 +634,7 @@ function configurePlugins(options) {
|
|
|
631
634
|
statsOptions: {
|
|
632
635
|
all: true,
|
|
633
636
|
},
|
|
637
|
+
...customStatoscopeConfig,
|
|
634
638
|
}));
|
|
635
639
|
}
|
|
636
640
|
}
|