Skip to content

Commit 8ae37f7

Browse files
authored
feat: per-page actionbars, hmr improvements and react support (#3)
1 parent 0b70bd0 commit 8ae37f7

18 files changed

Lines changed: 2014 additions & 90 deletions

‎package-lock.json‎

Lines changed: 138 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747
"@tanstack/history": "^1.161.6",
4848
"@tanstack/router-core": "^1.169.1",
4949
"@tanstack/solid-router": "^1.169.1",
50+
"@tanstack/react-router": "^1.169.1",
5051
"@triniwiz/nativescript-image-cache-it": "^8.0.1",
52+
"@types/react": "^19.0.0",
53+
"react": "^19.0.0",
54+
"react-reconciler": "^0.32.0",
5155
"babel-loader": "^9.1.3",
5256
"babel-preset-solid": "^1.8.19",
5357
"dominative": "^0.1.3",

‎packages/tanstack-router/nativescript.vite.mjs‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,18 @@ export default () => ({
8787
alias: {
8888
// Keep Vite behavior aligned with nativescript.webpack.js integration.
8989
'solid-js/web': solidWebShimPath,
90-
'solid-js/jsx-runtime': jsxRuntimeShimPath,
91-
'solid-js/jsx-dev-runtime': jsxRuntimeShimPath,
90+
// NOTE: do NOT alias `solid-js/jsx-runtime` / `solid-js/jsx-dev-runtime` to a
91+
// shim file INSIDE this package. @nativescript/vite (solid flavor) already provides
92+
// its own jsx-runtime shim and serves it over HTTP. When this alias pointed at
93+
// `./solid-js-jsx-runtime-shim.js` (a subpath of this vendored runtime plugin), the
94+
// @nativescript/vite device rewriter collapsed that subpath to the vendor-package
95+
// ROOT binding — `jsx = __nsPick("@nativescript/tanstack-router", "jsx")` — and the
96+
// root has no `jsx` export, so `jsx` was `undefined`. Every `jsx(...)` call in the
97+
// bundled router JSX (e.g. renderPage's `<RouterContextProvider><SafeRouteView/>`)
98+
// then threw "jsx is not a function", the route Page never rendered, the Frame stayed
99+
// empty, and the app showed a blank screen under HMR. Letting @nativescript/vite's
100+
// HTTP-served shim resolve these keeps `jsx` a real function. (The webpack path still
101+
// aliases them via nativescript.webpack.js, which has its own shim handling.)
92102
...(solidJsHPath
93103
? {
94104
'solid-js/h': solidJsHPath,

0 commit comments

Comments
 (0)