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

fix(types): Add missing type def for future value in @remix-run/dev/server-build #4771

Merged
merged 1 commit into from Dec 5, 2022
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
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!;