Skip to content

Commit

Permalink
fix: ssr packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Dec 5, 2023
1 parent 3aab41d commit c7ed15c
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 473 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: Install dependencies
run: pnpm --filter "./packages/**" --prefer-offline install --no-frozen-lockfile
- name: Build & Test
run: npx nx run-many --targets=test,build --projects=@tanstack/* --exclude=@tanstack/react-start
run: npx nx run-many --targets=test,build --projects=@tanstack/*
2 changes: 1 addition & 1 deletion examples/react/basic-ssr-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@tanstack/react-router": "0.0.1-beta.232",
"@tanstack/react-start": "0.0.1-beta.204",
"@tanstack/react-router-server": "0.0.1-beta.232",
"@tanstack/router-cli": "0.0.1-beta.232",
"@tanstack/router-devtools": "0.0.1-beta.232",
"axios": "^1.1.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-ssr-file-based/src/entry-client.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import ReactDOM from 'react-dom/client'

import { StartClient } from '@tanstack/react-start/client'
import { StartClient } from '@tanstack/react-router-server/client'
import { createRouter } from './router'

const router = createRouter()
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-ssr-file-based/src/entry-server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOMServer from 'react-dom/server'
import { createMemoryHistory } from '@tanstack/react-router'
import { ServerResponse } from 'http'
import express from 'express'
import { StartServer } from '@tanstack/react-start/server'
import { StartServer } from '@tanstack/react-router-server/server'
import { createRouter } from './router'

// index.js
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-ssr-file-based/src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import * as React from 'react'
import { Link, Outlet, rootRouteWithContext } from '@tanstack/react-router'
import { DehydrateRouter } from '@tanstack/react-start/client'
import { DehydrateRouter } from '@tanstack/react-router-server/client'
import { RouterContext } from '../routerContext'

export const Route = rootRouteWithContext<RouterContext>()({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import ReactDOM from 'react-dom/client'

import { StartClient } from '@tanstack/react-start/client'
import { StartClient } from '@tanstack/react-router-server/client'
import { createRouter } from './router'

const router = createRouter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createMemoryHistory } from '@tanstack/react-router'
import {
StartServer,
transformStreamWithRouter,
} from '@tanstack/react-start/server'
} from '@tanstack/react-router-server/server'
import isbot from 'isbot'
import { ServerResponse } from 'http'
import express from 'express'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import * as React from 'react'
import { Link, Outlet, rootRouteWithContext } from '@tanstack/react-router'
import { DehydrateRouter } from '@tanstack/react-start/client'
import { DehydrateRouter } from '@tanstack/react-router-server/client'
import { RouterContext } from '../routerContext'

export const Route = rootRouteWithContext<RouterContext>()({
Expand Down
2 changes: 1 addition & 1 deletion examples/react/with-bling/src/entry-client.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import ReactDOM from 'react-dom/client'

import { StartClient } from '@tanstack/react-start/client'
import { StartClient } from '@tanstack/react-router-server/client'
import { createRouter } from './router'

const router = createRouter()
Expand Down
2 changes: 1 addition & 1 deletion examples/react/with-bling/src/entry-server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createMemoryHistory } from '@tanstack/react-router'
import {
StartServer,
transformStreamWithRouter,
} from '@tanstack/react-start/server'
} from '@tanstack/react-router-server/server'
import isbot from 'isbot'
import { ServerResponse } from 'http'
import express from 'express'
Expand Down
9 changes: 2 additions & 7 deletions examples/react/with-bling/src/routes/root.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import * as React from 'react'
import {
Link,
Outlet,
RouterContext,
rootRouteWithContext,
} from '@tanstack/react-router'
import { DehydrateRouter } from '@tanstack/react-start/client'
import { Link, Outlet, rootRouteWithContext } from '@tanstack/react-router'
import { DehydrateRouter } from '@tanstack/react-router-server/client'

const rootRoute = rootRouteWithContext<{
head: string
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "is-ci-cli test:ci test:dev",
"test:ci": "pnpm --parallel test",
"test:dev": "vitest",
"buildNx": "nx run-many --target=build --projects=@tanstack/* --exclude=@tanstack/react-start",
"buildNx": "nx run-many --target=build --projects=@tanstack/*",
"build": "rollup --config rollup.config.js && pnpm typecheck",
"watch": "concurrently --no-color --prefix \"watch\" --kill-others --raw \"rollup --config rollup.config.js -w\" \"tsc -b --watch --preserveWatchOutput\"",
"dev": "pnpm watch",
Expand Down
Loading

0 comments on commit c7ed15c

Please sign in to comment.