Skip to content

Commit

Permalink
chore: sync FutureConfig interface
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Feb 15, 2023
1 parent ff22f78 commit 2c42531
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .changeset/twelve-seahorses-arrive.md
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions packages/remix-react/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 10 additions & 2 deletions packages/remix-server-runtime/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions packages/remix-testing/create-remix-stub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2c42531

Please sign in to comment.