-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
refactor(router-core): moving the router core into separate package #3171
base: main
Are you sure you want to change the base?
Conversation
1a7588d
to
780faf6
Compare
@schiller-manuel @chorobin any idea how this affects the global module declaration merging that we use for type-safety. |
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Sean Cassiere <[email protected]>
db357a7
to
644ae8b
Compare
View your CI Pipeline Execution ↗ for commit a5de1ba.
☁️ Nx Cloud last updated this comment at |
This comment was marked as resolved.
This comment was marked as resolved.
@schiller-manuel @chorobin any thoughts as to where this declaration merge type error is coming from? |
@SeanCassiere , I find it helps to add examples/react/router-monorepo-react-query/packages/router/package.json |
The problem here is that it shouldn't require this.
|
@SeanCassiere , right. I've looked at how query does it, but it's using tsup /esbuild rather than vite / rollup. I don't think the setup from query is better at this, it might just be less strict, similar to if the examples/../router/tsconfig.json had an I went down a rabit hole with dts / https://api-extractor.com/ and the bundledPackages, and I couldn't make it give the right result. Then there's the Basically, the only solution I've been able to make work here, that doesn't carbon-copy the router-core into e.g. react-router putting us where we started, is to have a symlink doing the same thing. I.e. a link from react-router/src/core -> router-core/src, so that instead of the dependency on @tanstack/router-core, the react-router just imports |
This is a preparation step for:
solid-router
androuter-core
#3086It moves pieces of shared logic from react-router to router-core, and imports it from there.
The exports in react-router/src/index.tsx are kept as is, by re-exporting functions from router-core, to avoid breaking changes.