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

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.
@@ -19,12 +19,6 @@ export const createRsbuildConfig = ({ cwd }) => {
19
19
  },
20
20
  define: envVars
21
21
  },
22
- resolve: {
23
- alias: {
24
- // This is a temporary fix, until we sort out the `react-butterfiles` dependency.
25
- "react-butterfiles": "@webiny/app/react-butterfiles"
26
- }
27
- },
28
22
  output: { distPath: { root: paths.admin.outputFolder } },
29
23
  mode,
30
24
  dev: { hmr: true },
@@ -7,14 +7,19 @@ export const createRsbuildConfig = async ({ cwd }) => {
7
7
  const { default: rspack } = await import("@rspack/core");
8
8
  const paths = getPaths(cwd);
9
9
  const mode = getMode();
10
+ const isDebugEnabled = process.env.DEBUG === "true";
11
+
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;
10
14
 
11
15
  return /** @type {import("@rsbuild/core").RsbuildConfig} */ ({
12
16
  source: { entry: { index: paths.fn.entryFile } },
13
17
  output: {
14
18
  module: true,
15
19
  target: "node",
20
+ minify: true,
16
21
  sourceMap: {
17
- js: process.env.DEBUG === "true" ? "source-map" : false
22
+ js: isDebugEnabled ? "source-map" : false
18
23
  },
19
24
  filename: {
20
25
  js: pathData => {
@@ -27,7 +32,10 @@ export const createRsbuildConfig = async ({ cwd }) => {
27
32
  distPath: { root: paths.fn.outputFolder }
28
33
  },
29
34
  performance: {
30
- printFileSize: false
35
+ printFileSize: false,
36
+ hints: "error",
37
+ maxEntrypointSize: maxBundleSize,
38
+ maxAssetSize: maxBundleSize
31
39
  },
32
40
  tools: {
33
41
  rspack: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/build-tools",
3
- "version": "6.4.0-beta.0",
3
+ "version": "6.4.0-beta.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -22,7 +22,7 @@
22
22
  "@rsbuild/plugin-sass": "1.5.2",
23
23
  "@rsbuild/plugin-svgr": "2.0.2",
24
24
  "@rsbuild/plugin-type-check": "1.3.4",
25
- "@rslib/core": "0.21.4",
25
+ "@rslib/core": "0.21.5",
26
26
  "@rspack/core": "2.0.3",
27
27
  "@swc/plugin-emotion": "14.9.0",
28
28
  "@tailwindcss/postcss": "4.3.0",
@@ -76,5 +76,5 @@
76
76
  "access": "public",
77
77
  "directory": "."
78
78
  },
79
- "gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
79
+ "gitHead": "872f9f50baa1ff6915a5f338216f84bf0b6dfd24"
80
80
  }