Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect } from "react";
import { TooltipProvider } from "@radix-ui/react-tooltip";
import { setEnv } from "../packages/feature-flags/src/index";
import { theme, globalCss } from "../packages/design-system/src/index";
import { color } from "../packages/design-system/src/__generated__/figma-design-tokens";
import { color } from "../packages/design-system/src/design-tokens";

// this adds <style> tags to the <head> of the document
import "@fontsource-variable/inter";
Expand Down
10 changes: 9 additions & 1 deletion apps/builder/e2e/serve-built-remix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { installGlobals } from "@remix-run/node";
import { createRequestHandler as createExpressRequestHandler } from "@remix-run/express";
import type { ServerBuild } from "@remix-run/server-runtime";
import express from "express";
import { readdirSync, readFileSync } from "node:fs";
import { existsSync, readdirSync, readFileSync } from "node:fs";
import https from "node:https";
import path from "node:path";
import { pathToFileURL } from "node:url";
Expand All @@ -11,6 +11,14 @@ installGlobals({ nativeFetch: true });

const resolveServerBuildPath = () => {
const serverDirectory = path.resolve("build/server");

// Standard Vite build (no vercelPreset): index.js is at the root of build/server/
const directEntry = path.join(serverDirectory, "index.js");
if (existsSync(directEntry)) {
return directEntry;
}

// Vercel preset build: index.js lives inside a hash-named subdirectory
const serverBuild = readdirSync(serverDirectory, {
withFileTypes: true,
}).find((entry) => entry.isDirectory());
Expand Down
Loading