@gravity-ui/app-builder 0.5.5 → 0.5.6

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.6](https://github.com/gravity-ui/app-builder/compare/v0.5.5...v0.5.6) (2023-07-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * add webpack cache option ([#47](https://github.com/gravity-ui/app-builder/issues/47)) ([fb5311a](https://github.com/gravity-ui/app-builder/commit/fb5311a5635dfc95051434fdeb878b4c34c457c2))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * make statoscope config fields optional ([#45](https://github.com/gravity-ui/app-builder/issues/45)) ([1e80938](https://github.com/gravity-ui/app-builder/commit/1e809384b3af358ed4837d57c28928a291e99a4e))
14
+
3
15
  ## [0.5.5](https://github.com/gravity-ui/app-builder/compare/v0.5.4...v0.5.5) (2023-07-07)
4
16
 
5
17
 
package/README.md CHANGED
@@ -188,6 +188,8 @@ With this `{rootDir}/src/ui/tsconfig.json`:
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
+ - `cache` (`boolean | FileCacheOptions | MemoryCacheOptions`) — Cache the generated webpack modules and chunks to improve build speed. [more](https://webpack.js.org/configuration/cache/)
192
+ - `babelCacheDirectory` (`boolean | string`) — Set directory for babel-loader cache (`default: node_modules/.cache/babel-loader``)
191
193
 
192
194
  ##### Dev build
193
195
 
@@ -2,7 +2,7 @@ import type { EditorLanguage } from 'monaco-editor-webpack-plugin/out/languages'
2
2
  import type { EditorFeature } from 'monaco-editor-webpack-plugin/out/features';
3
3
  import type { IFeatureDefinition } from 'monaco-editor-webpack-plugin/out/types';
4
4
  import type { Options as MomentTzOptions } from 'moment-timezone-data-webpack-plugin';
5
- import type { Configuration, ResolveOptions, DefinePlugin } from 'webpack';
5
+ import type { Configuration, ResolveOptions, DefinePlugin, FileCacheOptions, MemoryCacheOptions } 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';
@@ -126,7 +126,7 @@ export interface ClientConfig {
126
126
  entryFilter?: string[];
127
127
  excludeFromClean?: string[];
128
128
  analyzeBundle?: 'true' | 'statoscope';
129
- statoscopeConfig?: StatoscopeOptions;
129
+ statoscopeConfig?: Partial<StatoscopeOptions>;
130
130
  reactProfiling?: boolean;
131
131
  /**
132
132
  * Disable react-refresh in dev mode
@@ -165,6 +165,8 @@ export interface ClientConfig {
165
165
  * use webpack 5 Web Workers [syntax](https://webpack.js.org/guides/web-workers/#syntax)
166
166
  */
167
167
  newWebWorkerSyntax?: boolean;
168
+ babelCacheDirectory?: boolean | string;
169
+ cache?: boolean | FileCacheOptions | MemoryCacheOptions;
168
170
  }
169
171
  interface CdnUploadConfig {
170
172
  bucket: string;
@@ -91,6 +91,7 @@ function webpackConfigFactory(webpackMode, config, { logger } = {}) {
91
91
  snapshot: {
92
92
  managedPaths: config.watchOptions?.watchPackages ? [] : undefined,
93
93
  },
94
+ cache: config.cache,
94
95
  };
95
96
  }
96
97
  exports.webpackConfigFactory = webpackConfigFactory;
@@ -274,7 +275,7 @@ function createJavaScriptLoader({ isEnvProduction, isEnvDevelopment, config, })
274
275
  isEnvProduction && require.resolve('babel-plugin-lodash'),
275
276
  ].filter(Boolean),
276
277
  sourceType: 'unambiguous',
277
- cacheDirectory: true,
278
+ cacheDirectory: config.babelCacheDirectory ? config.babelCacheDirectory : true,
278
279
  cacheCompression: isEnvProduction,
279
280
  compact: isEnvProduction,
280
281
  sourceMap: !config.disableSourceMapGeneration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
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",