diff --git a/.changeset/twelve-seahorses-arrive.md b/.changeset/twelve-seahorses-arrive.md new file mode 100644 index 00000000000..f848f645bbe --- /dev/null +++ b/.changeset/twelve-seahorses-arrive.md @@ -0,0 +1,9 @@ +--- +"remix": patch +"@remix-run/dev": patch +"@remix-run/react": patch +"@remix-run/serve": patch +"@remix-run/server-runtime": patch +--- + +sync `FutureConfig` interface between packages diff --git a/packages/remix-react/entry.ts b/packages/remix-react/entry.ts index 40b5653a783..cc715485c78 100644 --- a/packages/remix-react/entry.ts +++ b/packages/remix-react/entry.ts @@ -19,14 +19,23 @@ export interface EntryContext extends RemixContextObject { staticHandlerContext: StaticHandlerContext; } +type Dev = { + port?: number; + appServerPort?: number; + remixRequestHandlerPath?: string; + rebuildPollIntervalMs?: number; +}; + export interface FutureConfig { unstable_cssModules: boolean; unstable_cssSideEffectImports: boolean; + unstable_dev: boolean | Dev; unstable_postcss: boolean; unstable_tailwind: boolean; unstable_vanillaExtract: boolean; v2_errorBoundary: boolean; v2_meta: boolean; + v2_routeConvention: boolean; } export interface AssetsManifest { diff --git a/packages/remix-server-runtime/entry.ts b/packages/remix-server-runtime/entry.ts index 5841fd60101..f5519ea7c5a 100644 --- a/packages/remix-server-runtime/entry.ts +++ b/packages/remix-server-runtime/entry.ts @@ -11,15 +11,23 @@ export interface EntryContext { future: FutureConfig; } +type Dev = { + port?: number; + appServerPort?: number; + remixRequestHandlerPath?: string; + rebuildPollIntervalMs?: number; +}; + export interface FutureConfig { - unstable_cssModules: true; + unstable_cssModules: boolean; unstable_cssSideEffectImports: boolean; - unstable_dev: false | { remixRequestHandlerPath?: string }; + unstable_dev: boolean | Dev; unstable_postcss: boolean; unstable_tailwind: boolean; unstable_vanillaExtract: boolean; v2_errorBoundary: boolean; v2_meta: boolean; + v2_routeConvention: boolean; } export interface AssetsManifest { diff --git a/packages/remix-server-runtime/server.ts b/packages/remix-server-runtime/server.ts index de337434b76..0e1b398bd82 100644 --- a/packages/remix-server-runtime/server.ts +++ b/packages/remix-server-runtime/server.ts @@ -55,7 +55,7 @@ export const createRequestHandler: CreateRequestHandlerFunction = ( let { unstable_dev } = build.future; if ( mode === "development" && - unstable_dev !== false && + typeof unstable_dev !== "boolean" && url.pathname === (unstable_dev.remixRequestHandlerPath ?? "") + "/__REMIX_ASSETS_MANIFEST" diff --git a/packages/remix-testing/create-remix-stub.tsx b/packages/remix-testing/create-remix-stub.tsx index 08c6d735f48..de1429be54a 100644 --- a/packages/remix-testing/create-remix-stub.tsx +++ b/packages/remix-testing/create-remix-stub.tsx @@ -65,11 +65,13 @@ export function createRemixStub(routes: (RouteObject | DataRouteObject)[]) { future: { unstable_cssModules: false, unstable_cssSideEffectImports: false, + unstable_dev: false, unstable_postcss: false, unstable_tailwind: false, unstable_vanillaExtract: false, v2_errorBoundary: false, v2_meta: false, + v2_routeConvention: false, ...remixConfigFuture, }, manifest: createManifest(routerRef.current.routes),