Skip to content

Commit

Permalink
fix(types): Add missing type def for future value in server build mod…
Browse files Browse the repository at this point in the history
…ule (#4771)
  • Loading branch information
chaance authored and kentcdodds committed Dec 15, 2022
1 parent f569af9 commit a1f73be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-tigers-look.md
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Added a missing type definition for the Remix config `future` option to the `@remix-run/dev/server-build` virtual module
Expand Up @@ -33,6 +33,8 @@ export function serverEntryModulePlugin(config: RemixConfig): Plugin {
import * as entryServer from ${JSON.stringify(`./${config.entryServerFile}`)};
${Object.keys(config.routes)
.map((key, index) => {
// IMPORTANT: Any values exported from this generated module must also be
// typed in `packages/remix-dev/server-build.ts` to avoid tsc errors.
let route = config.routes[key];
return `import * as route${index} from ${JSON.stringify(
`./${route.file}`
Expand Down
1 change: 1 addition & 0 deletions packages/remix-dev/server-build.ts
Expand Up @@ -10,6 +10,7 @@ throw new Error(
export const assets: ServerBuild["assets"] = undefined!;
export const entry: ServerBuild["entry"] = undefined!;
export const routes: ServerBuild["routes"] = undefined!;
export const future: ServerBuild["future"] = undefined!;
export const publicPath: ServerBuild["publicPath"] = undefined!;
// prettier-ignore
export const assetsBuildDirectory: ServerBuild["assetsBuildDirectory"] = undefined!;

0 comments on commit a1f73be

Please sign in to comment.