1import * as Namespace from "../../Namespace.ts";
2import { makeFrameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
3
4/** Configuration for a Prisma SolidStart website. */
5export interface SolidStartProps extends FrameworkSiteProps {
6 /** Serializable Nitro plugin options, including prerender and routeRules. The Node target owns preset. */
7 nitro?: Record<string, unknown>;
8}
9
10/**
11 * SolidStart SSR and prerendered assets on Prisma Compute. The integration owns the Nitro plugin; omit nitroV2Plugin() from vite.config.* and configure prerendering through nitro.
12 *
13 * Native framework development and HMR run without Prisma cloud resources.
14 * Apply `Alchemy.remote()` to use the live Compute deployment during dev.
15 * Packaging requires the optional `@vercel/nft` peer dependency.
16 *
17 * ### Creating a Website
18 * **Example:** SolidStart application
19 * ```typescript
20 * const site = yield* Prisma.Website.SolidStart("Web", {
21 * rootDir: "./app",
22 * });
23 * ```
24 *
25 * ### Deployment Configuration
26 * **Example:** Existing project and custom hostname
27 * ```typescript
28 * const site = yield* Prisma.Website.SolidStart("Web", {
29 * project,
30 * domain: "www.example.com",
31 * env: { API_BASE: "https://api.example.com" },
32 * compute: { destroyOldDeployment: true },
33 * });
34 * ```
35 *
36 * @resource
37 * @product Website
38 */
39export const SolidStart = (id: string, props: SolidStartProps = {}) =>
40 makeFrameworkSite(id, props, {
41 framework: "@alchemy.run/frontend-frameworks/solidstart",
42 target: "@alchemy.run/frontend-frameworks/solidstart/node",
43 options: { nitro: props.nitro },
44 }).pipe(Namespace.push(id));