@webiny/build-tools 6.6.0-alpha.3 → 6.6.0-alpha.4

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.
@@ -13,8 +13,8 @@ export const createRsbuildConfig = async ({ cwd, enforceMaxBundleSize }) => {
13
13
  // NOTE: dirty for now — sniffing the hosting type off an env var here. Ideally the build config
14
14
  // wouldn't know about hosting types at all: the caller (createBuildFunction, or the flavour's own
15
15
  // build layer) would pass in the externals policy + assetPrefix as options, keeping this file
16
- // hosting-agnostic. Good enough while the server hosting type is ALPHA; revisit when it settles.
17
- const isServer = process.env.WEBINY_HOSTING_TYPE === "server";
16
+ // hosting-agnostic. Good enough while the standalone hosting type is ALPHA; revisit when it settles.
17
+ const isStandalone = process.env.WEBINY_HOSTING_TYPE === "standalone";
18
18
 
19
19
  // Configurable via WEBINY_INFRA_API_MAX_BUNDLE_SIZE (bytes).
20
20
  // Only enforced during build — watch mode skips size checks.
@@ -31,7 +31,7 @@ export const createRsbuildConfig = async ({ cwd, enforceMaxBundleSize }) => {
31
31
  // (handler.mjs) instead, so the chunk loads from build/. publicPath comes from
32
32
  // `output.assetPrefix` in production and `dev.assetPrefix` in development (watch runs
33
33
  // `rsbuild.build({ watch: true })` under NODE_ENV=development), so set BOTH. Not gated to the
34
- // server hosting type: AWS has no worker chunks so it's a no-op there, and for any other
34
+ // standalone hosting type: AWS has no worker chunks so it's a no-op there, and for any other
35
35
  // (async import) chunks "auto" is at least as correct as "/" (Lambda runs from its own dir too).
36
36
  dev: { assetPrefix: "auto" },
37
37
  output: {
@@ -85,7 +85,7 @@ export const createRsbuildConfig = async ({ cwd, enforceMaxBundleSize }) => {
85
85
  // one at runtime (e.g. better-sqlite3). AWS additionally externalizes aws-sdk (the
86
86
  // Lambda runtime provides it). Server ships these in build/node_modules — the build's
87
87
  // packaging step (CI/Linux) copies them, natives included.
88
- externals: isServer
88
+ externals: isStandalone
89
89
  ? [/^sharp$/, /^knex(\/|$)/]
90
90
  : [/^@aws-sdk/, /^aws-sdk$/, /^sharp$/, /^knex(\/|$)/],
91
91
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/build-tools",
3
- "version": "6.6.0-alpha.3",
3
+ "version": "6.6.0-alpha.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",