Repository navigation
feat: Solid 2, TanStack Router 2 and @nativescript/vite 8 - #2
Merged
Merged
Conversation
- Solid 2 (solid-js, @solidjs/web, @solidjs/universal) with
@nativescript-community/solid-js 2 and @tanstack/solid-router 2 rc.
- vite.config.mts composes @nativescript/vite's baseConfig with
@solidjs/vite-plugin, pins Solid's browser bundles, and registers the
TanStack router plugin so routeTree.gen.ts regenerates.
- Entry boots through startSolidApp for HMR remounts.
- All deps on npm latest (NativeScript 9.1); scripts reduced to ns debug,
since the 9.1 CLI drives the Vite dev server itself.
- File routes use explicit createFileRoute("/path") ids.
- Components avoid top-level reactive reads (Solid 2 STRICT_READ_UNTRACKED).
- Info.plist adopts the UIScene lifecycle, required by iOS 27.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moves the demo to the current stack: Solid 2,
@tanstack/solid-router2 (rc),@nativescript/vite8 and NativeScript 9.1.All dependencies come from npm. This includes
@nativescript/tanstack-router@0.2.1(NativeScript/tanstack#4, #5) and@nativescript/vite@8.0.24, which applies plugins from dependencynativescript.vite.mjsconfigs (NativeScript/NativeScript#11669).Changes
@tanstack/solid-router, which is on2.0.0-rc.12because the Solid 2 router has only release candidates so far.solid-js/@solidjs/web/@solidjs/universal2.0.3,@nativescript-community/solid-js2.0.1,@nativescript/core9.1.4,@nativescript/vite8.0.24,@nativescript/tanstack-router0.2.1.babel-preset-solid,solid-refresh,babel*,concurrently,wait-on, and theviteoverride..npmrcsetslegacy-peer-deps=true, because a few of the router rc's own dependencies still declare Solid 1 peer ranges.ns debug ios|android|visionosremain; the 9.1 CLI runs the Vite dev server itself.vite.config.tsbecomesvite.config.mts, composing@nativescript/vite'sbaseConfigwith@solidjs/vite-plugin(universal output).routeTree.gen.tsregenerates on build.startSolidAppfrom@nativescript/vite/solid-bootstrap, which handles HMR remounts.createFileRoute("/path")ids.routeTree.gen.tswas regenerated, with the same routes in a new order.useStableLoaderDatais a single memo with an optional lazy fallback.post-listauthor lookup no longer read signals at the top level, which Solid 2 freezes.Info.plistadopts the UIScene lifecycle; iOS 27 traps at launch without it.Verified
tsc --noEmitpasses, and production Vite builds pass for iOS and Android.routeTree.gen.tsregenerates an identical file.?@modal=user sheet open and close, the virtual and inspector routes,history.back(), about, and a shared-component HMR update. Frame backstack and router history stayed in sync, with no Solid diagnostics or JS errors.Known follow-up
After an HMR edit to a shared (non-route) component, the app returns to
/, because a fresh router is created. This is noted in NativeScript/tanstack#4.