@vercel/remix-builder 5.8.6 → 5.9.1
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/dist/index.js +44 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2446,10 +2446,12 @@ var require_semver2 = __commonJS({
|
|
|
2446
2446
|
var src_exports = {};
|
|
2447
2447
|
__export(src_exports, {
|
|
2448
2448
|
build: () => build3,
|
|
2449
|
+
diagnostics: () => diagnostics,
|
|
2449
2450
|
prepareCache: () => prepareCache,
|
|
2450
2451
|
version: () => version
|
|
2451
2452
|
});
|
|
2452
2453
|
module.exports = __toCommonJS(src_exports);
|
|
2454
|
+
var import_build_utils6 = require("@vercel/build-utils");
|
|
2453
2455
|
|
|
2454
2456
|
// src/build-vite.ts
|
|
2455
2457
|
var import_fs2 = require("fs");
|
|
@@ -2988,7 +2990,8 @@ var build = async ({
|
|
|
2988
2990
|
workPath,
|
|
2989
2991
|
repoRootPath,
|
|
2990
2992
|
config,
|
|
2991
|
-
meta = {}
|
|
2993
|
+
meta = {},
|
|
2994
|
+
service
|
|
2992
2995
|
}) => {
|
|
2993
2996
|
const { installCommand, buildCommand } = config;
|
|
2994
2997
|
const mountpoint = (0, import_path2.dirname)(entrypoint);
|
|
@@ -3002,6 +3005,7 @@ var build = async ({
|
|
|
3002
3005
|
);
|
|
3003
3006
|
const {
|
|
3004
3007
|
cliType,
|
|
3008
|
+
lockfilePath,
|
|
3005
3009
|
lockfileVersion,
|
|
3006
3010
|
packageJson,
|
|
3007
3011
|
packageJsonPackageManager,
|
|
@@ -3034,6 +3038,21 @@ var build = async ({
|
|
|
3034
3038
|
config.projectSettings?.createdAt
|
|
3035
3039
|
);
|
|
3036
3040
|
}
|
|
3041
|
+
try {
|
|
3042
|
+
await (0, import_build_utils3.generateProjectManifest)({
|
|
3043
|
+
workPath: entrypointFsDirname,
|
|
3044
|
+
nodeVersion,
|
|
3045
|
+
cliType,
|
|
3046
|
+
lockfilePath,
|
|
3047
|
+
lockfileVersion,
|
|
3048
|
+
framework: config.framework ?? void 0,
|
|
3049
|
+
serviceType: service ? (0, import_build_utils3.getReportedServiceType)(service) : void 0
|
|
3050
|
+
});
|
|
3051
|
+
} catch (err) {
|
|
3052
|
+
(0, import_build_utils3.debug)(
|
|
3053
|
+
`Failed to write remix manifest: ${err instanceof Error ? err.message : String(err)}`
|
|
3054
|
+
);
|
|
3055
|
+
}
|
|
3037
3056
|
const frameworkVersion = await getPackageVersion(
|
|
3038
3057
|
frameworkSettings.primaryPackageName,
|
|
3039
3058
|
entrypointFsDirname,
|
|
@@ -3179,6 +3198,7 @@ var build = async ({
|
|
|
3179
3198
|
const staticFileKeys = new Set(Object.keys(staticFiles));
|
|
3180
3199
|
const prerenderRewrites = [];
|
|
3181
3200
|
const routes = [];
|
|
3201
|
+
let hasReactRouterIndexFunction = false;
|
|
3182
3202
|
for (const [id, functionId] of Object.entries(
|
|
3183
3203
|
buildManifest.routeIdToServerBundleId ?? {}
|
|
3184
3204
|
)) {
|
|
@@ -3202,6 +3222,9 @@ var build = async ({
|
|
|
3202
3222
|
}
|
|
3203
3223
|
output[path] = func;
|
|
3204
3224
|
if (isReactRouter) {
|
|
3225
|
+
if (path === "index") {
|
|
3226
|
+
hasReactRouterIndexFunction = true;
|
|
3227
|
+
}
|
|
3205
3228
|
for (const dataPath of getReactRouterDataPaths(path)) {
|
|
3206
3229
|
if (!staticFileKeys.has(dataPath)) {
|
|
3207
3230
|
output[dataPath] = func;
|
|
@@ -3228,7 +3251,7 @@ var build = async ({
|
|
|
3228
3251
|
routes.unshift(...prerenderRewrites, { handle: "filesystem" });
|
|
3229
3252
|
routes.push({
|
|
3230
3253
|
src: "/(.*)",
|
|
3231
|
-
dest: isReactRouter ? getReactRouterCatchAllDest() : "/"
|
|
3254
|
+
dest: isReactRouter && hasReactRouterIndexFunction ? getReactRouterCatchAllDest() : "/"
|
|
3232
3255
|
});
|
|
3233
3256
|
routes.push({
|
|
3234
3257
|
handle: "hit"
|
|
@@ -3489,7 +3512,8 @@ var build2 = async ({
|
|
|
3489
3512
|
workPath,
|
|
3490
3513
|
repoRootPath,
|
|
3491
3514
|
config,
|
|
3492
|
-
meta = {}
|
|
3515
|
+
meta = {},
|
|
3516
|
+
service
|
|
3493
3517
|
}) => {
|
|
3494
3518
|
const { installCommand, buildCommand } = config;
|
|
3495
3519
|
await (0, import_build_utils4.download)(files, workPath, meta);
|
|
@@ -3544,6 +3568,21 @@ var build2 = async ({
|
|
|
3544
3568
|
config.projectSettings?.createdAt
|
|
3545
3569
|
);
|
|
3546
3570
|
}
|
|
3571
|
+
try {
|
|
3572
|
+
await (0, import_build_utils4.generateProjectManifest)({
|
|
3573
|
+
workPath: entrypointFsDirname,
|
|
3574
|
+
nodeVersion,
|
|
3575
|
+
cliType,
|
|
3576
|
+
lockfilePath,
|
|
3577
|
+
lockfileVersion,
|
|
3578
|
+
framework: config.framework ?? void 0,
|
|
3579
|
+
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
|
|
3580
|
+
});
|
|
3581
|
+
} catch (err) {
|
|
3582
|
+
(0, import_build_utils4.debug)(
|
|
3583
|
+
`Failed to write remix manifest: ${err instanceof Error ? err.message : String(err)}`
|
|
3584
|
+
);
|
|
3585
|
+
}
|
|
3547
3586
|
const isHydrogen2 = Boolean(
|
|
3548
3587
|
pkg.dependencies?.["@shopify/remix-oxygen"] || pkg.devDependencies?.["@shopify/remix-oxygen"]
|
|
3549
3588
|
);
|
|
@@ -4107,9 +4146,11 @@ var prepareCache = async ({
|
|
|
4107
4146
|
|
|
4108
4147
|
// src/index.ts
|
|
4109
4148
|
var version = 2;
|
|
4149
|
+
var diagnostics = (0, import_build_utils6.createDiagnostics)("node");
|
|
4110
4150
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4111
4151
|
0 && (module.exports = {
|
|
4112
4152
|
build,
|
|
4153
|
+
diagnostics,
|
|
4113
4154
|
prepareCache,
|
|
4114
4155
|
version
|
|
4115
4156
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/remix-builder",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"glob": "10.3.16",
|
|
29
29
|
"semver": "7.5.2",
|
|
30
30
|
"vitest": "2.0.1",
|
|
31
|
-
"@vercel/build-utils": "13.
|
|
31
|
+
"@vercel/build-utils": "13.29.1"
|
|
32
32
|
},
|
|
33
33
|
"VERCEL_REMIX_RUN_DEV_MAX_VERSION": "2.16.6",
|
|
34
34
|
"scripts": {
|