This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
fix: fix react router typings with tsconfig path #257
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See this github issue for context on this fix. Essentially, Storybook 6.4 depends on
react-router-dom
v6, which includes a dependency on an updated version ofreact-router
that includes typings. We're relying on a version that requires us to use@types/react-router
, but the types in that package don't take precedence -react-router
v6'sindex.d.ts
does.The best fix would be to upgrade
react-router-dom
, but that would require more refactoring and more updates in Local core and maybe even add-ons. We could also update storybook tov6.5
, but that is still in beta and will probably be a larger update with more problems. So until then, this should fix it, especially since we aren't compiling any code innode_modules
that would depend on v6 typings afaik.