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 import path for Remix 1.6.2+ #35

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Fix import path for Remix 1.6.2+ #35

merged 1 commit into from
Jan 20, 2023

Conversation

haines
Copy link
Contributor

@haines haines commented Jan 20, 2023

Remix 1.6.2 changed the package layout, which breaks an import and causes typechecking errors:

node_modules/remix-flat-routes/dist/index.d.ts(1,57): error TS2307: Cannot find module '@remix-run/dev/config/routes' or its corresponding type declarations.

@kiliman
Copy link
Owner

kiliman commented Jan 20, 2023

Ah, I see. This was used by the tests. Since actual usage will pass in defineRoutes provided by Remix, that's why it didn't break in general.

I should probably just create a dummy defineRoutes for tests instead of doing a deep import (which may break again in the future, since that's technically an implementation detail).

@kiliman kiliman merged commit 7c6ef6d into kiliman:main Jan 20, 2023
@haines haines deleted the dist branch January 20, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants