@webiny/build-tools 6.6.0-alpha.2 → 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.
@@ -47,8 +47,14 @@ export const createRsbuildConfig = ({ cwd }) => {
47
47
  },
48
48
  // Port precedence matches the served admin app (`webiny serve admin`): an explicit
49
49
  // WEBINY_ADMIN_PORT wins, then a PORT injected by the environment, then the 3001 default.
50
+ //
51
+ // An explicit port is strict, same rule the api runner follows. Auto-advancing off a busy
52
+ // port is a reasonable default, but it's the wrong answer when something was pointed at the
53
+ // port that was asked for: the dev proxy forwards to WEBINY_ADMIN_PORT, and a dev server that
54
+ // quietly moved one along would just leave it forwarding into nothing.
50
55
  server: {
51
56
  port: process.env.WEBINY_ADMIN_PORT || process.env.PORT || 3001,
57
+ strictPort: Boolean(process.env.WEBINY_ADMIN_PORT),
52
58
  host: "0.0.0.0"
53
59
  },
54
60
  html: {
@@ -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.2",
3
+ "version": "6.6.0-alpha.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",