@webiny/build-tools 6.4.0-beta.2 → 6.4.0-beta.3

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.
@@ -2,6 +2,8 @@ import path from "path";
2
2
  import { pluginTypeCheck } from "@rsbuild/plugin-type-check";
3
3
  import { createImportValidatorPlugin } from "../importValidatorPlugin.js";
4
4
 
5
+ const DEFAULT_WEBINY_INFRA_API_MAX_BUNDLE_SIZE = 4_718_592; // 4.5 MB
6
+
5
7
  export const createRsbuildConfig = async ({ cwd }) => {
6
8
  // Must be a dynamic import — see rslibCompile.js for the reason.
7
9
  const { default: rspack } = await import("@rspack/core");
@@ -9,8 +11,10 @@ export const createRsbuildConfig = async ({ cwd }) => {
9
11
  const mode = getMode();
10
12
  const isDebugEnabled = process.env.DEBUG === "true";
11
13
 
12
- // Configurable via WEBINY_API_MAX_BUNDLE_SIZE (MB), default 10 MB.
13
- const maxBundleSize = (parseFloat(process.env.WEBINY_API_MAX_BUNDLE_SIZE) || 10) * 1024 * 1024;
14
+ // Configurable via WEBINY_INFRA_API_MAX_BUNDLE_SIZE (bytes).
15
+ const maxBundleSize =
16
+ parseInt(process.env.WEBINY_INFRA_API_MAX_BUNDLE_SIZE) ||
17
+ DEFAULT_WEBINY_INFRA_API_MAX_BUNDLE_SIZE;
14
18
 
15
19
  return /** @type {import("@rsbuild/core").RsbuildConfig} */ ({
16
20
  source: { entry: { index: paths.fn.entryFile } },
@@ -32,13 +36,15 @@ export const createRsbuildConfig = async ({ cwd }) => {
32
36
  distPath: { root: paths.fn.outputFolder }
33
37
  },
34
38
  performance: {
35
- printFileSize: false,
36
- hints: "error",
37
- maxEntrypointSize: maxBundleSize,
38
- maxAssetSize: maxBundleSize
39
+ printFileSize: false
39
40
  },
40
41
  tools: {
41
42
  rspack: {
43
+ performance: {
44
+ hints: "error",
45
+ maxEntrypointSize: maxBundleSize,
46
+ maxAssetSize: maxBundleSize
47
+ },
42
48
  externals: [/^@aws-sdk/, /^aws-sdk$/, /^sharp$/],
43
49
  plugins: [
44
50
  // This is necessary to enable JSDOM usage in Lambda.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/build-tools",
3
- "version": "6.4.0-beta.2",
3
+ "version": "6.4.0-beta.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -76,5 +76,5 @@
76
76
  "access": "public",
77
77
  "directory": "."
78
78
  },
79
- "gitHead": "872f9f50baa1ff6915a5f338216f84bf0b6dfd24"
79
+ "gitHead": "2e58681d4344024bfb60e6180338e2f154ec87f0"
80
80
  }