Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync FutureConfig interface #5398

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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