Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/tanstack-start/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ node_modules
.env
.vercel
.output
.vinxi
.nitro

/build/
/api/
/server/build
/public/build
.vinxi
.tanstack
# Sentry Config File
.env.sentry-build-plugin
/test-results/
Expand Down
22 changes: 0 additions & 22 deletions examples/tanstack-start/app.config.ts

This file was deleted.

42 changes: 21 additions & 21 deletions examples/tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
"sideEffects": false,
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"dev": "vite dev",
"build": "vite build",
"lingui:extract": "lingui extract --clean",
"start": "vinxi start"
"start": "node .output/server/index.mjs"
},
"dependencies": {
"@lingui/core": "^5.3.0",
"@lingui/react": "^5.3.0",
"@tanstack/react-router": "^1.114.27",
"@tanstack/react-router-devtools": "^1.114.27",
"@tanstack/react-start": "^1.114.28",
"@lingui/core": "^5.3.2",
"@lingui/react": "^5.3.2",
"@tanstack/react-router": "^1.121.34",
"@tanstack/react-router-devtools": "^1.121.34",
"@tanstack/react-start": "^1.121.34",
"cookie-es": "^2.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
"vinxi": "0.5.3"
"tailwind-merge": "^3.3.1"
},
"devDependencies": {
"@lingui/babel-plugin-lingui-macro": "^5.3.0",
"@lingui/cli": "^5.3.0",
"@lingui/vite-plugin": "^5.3.0",
"@lingui/babel-plugin-lingui-macro": "^5.3.2",
"@lingui/cli": "^5.3.2",
"@lingui/vite-plugin": "^5.3.2",
"@tailwindcss/vite": "^4.1.10",
"@types/node": "^22.5.4",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.2",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.5.2",
"tailwindcss": "^4.1.10",
"typescript": "^5.8.3",
"vite": "^6.3.5",
"vite-tsconfig-paths": "^5.1.4"
}
}
6 changes: 0 additions & 6 deletions examples/tanstack-start/postcss.config.mjs

This file was deleted.

19 changes: 0 additions & 19 deletions examples/tanstack-start/src/api.ts

This file was deleted.

16 changes: 11 additions & 5 deletions examples/tanstack-start/src/client.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
/// <reference types="vinxi/types/client" />
import { i18n } from "@lingui/core"
import { setupI18n } from "@lingui/core"
import { hydrateRoot } from "react-dom/client"
import { StartClient } from "@tanstack/react-start"
import { dynamicActivate } from "./modules/lingui/i18n"

import { createRouter } from "./router"
import { startTransition, StrictMode } from "react"

// The lang should be set by the server
dynamicActivate(document.documentElement.lang)
const i18n = setupI18n({})

const router = createRouter({ i18n })

hydrateRoot(document, <StartClient router={router} />)
startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<StartClient router={router} />
</StrictMode>,
)
})
10 changes: 10 additions & 0 deletions examples/tanstack-start/src/functions/headers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createIsomorphicFn } from "@tanstack/react-start";
import { getHeaders } from "@tanstack/react-start/server";

export const getIsomorphicHeaders = createIsomorphicFn()
.server(async () => {
return getHeaders();
})
.client(() => {
return {};
});
49 changes: 24 additions & 25 deletions examples/tanstack-start/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,34 @@ msgstr ""
"Plural-Forms: \n"

#. js-lingui-explicit-id
#: src/routes/users.$userId.tsx:18
msgid "Failed to fetch user"
msgstr "Failed to fetch user"

#. js-lingui-explicit-id
#: src/routes/users.route.tsx:18
msgid "Failed to fetch users"
msgstr "Failed to fetch users"

#. js-lingui-explicit-id
#: src/routes/api/users.$id.ts:22
msgid "User not found"
msgstr "User not found"
#: src/routes/deferred.tsx:10
msgid "Hello deferred!"
msgstr "Hello deferred!"

#: src/routes/posts_.$postId.deep.tsx:24
msgid "← All Posts"
msgstr "← All Posts"

#: src/routes/deferred.tsx:70
#: src/routes/deferred.tsx:57
msgid "Count: {count}"
msgstr "Count: {count}"

#: src/routes/posts.$postId.tsx:35
msgid "Deep View"
msgstr "Deep View"

#: src/routes/__root.tsx:138
#: src/routes/__root.tsx:144
msgid "Deferred"
msgstr "Deferred"

#: src/routes/users.$userId.tsx:20
msgid "Failed to fetch user"
msgstr "Failed to fetch user"

#: src/routes/users.route.tsx:19
msgid "Failed to fetch users"
msgstr "Failed to fetch users"

#: src/components/NotFound.tsx:19
msgid "Go back"
msgstr "Go back"
Expand All @@ -60,7 +58,7 @@ msgstr "Go to route A"
msgid "Go to route B"
msgstr "Go to route B"

#: src/routes/__root.tsx:106
#: src/routes/__root.tsx:112
#: src/components/DefaultCatchBoundary.tsx:37
msgid "Home"
msgstr "Home"
Expand All @@ -81,35 +79,35 @@ msgstr "I'm A!"
msgid "I'm B!"
msgstr "I'm B!"

#: src/routes/deferred.tsx:74
#: src/routes/deferred.tsx:61
msgid "Increment"
msgstr "Increment"

#: src/routes/deferred.tsx:44
#: src/routes/deferred.tsx:31
msgid "Loading person..."
msgstr "Loading person..."

#: src/routes/deferred.tsx:60
#: src/routes/deferred.tsx:47
msgid "Loading stuff..."
msgstr "Loading stuff..."

#: src/routes/posts.route.tsx:17
msgid "Non-existent Post"
msgstr "Non-existent Post"

#: src/routes/users.route.tsx:33
#: src/routes/users.route.tsx:34
msgid "Non-existent User"
msgstr "Non-existent User"

#: src/routes/__root.tsx:130
#: src/routes/__root.tsx:136
msgid "Pathless Layout"
msgstr "Pathless Layout"

#: src/routes/posts.$postId.tsx:14
msgid "Post not found"
msgstr "Post not found"

#: src/routes/__root.tsx:114
#: src/routes/__root.tsx:120
msgid "Posts"
msgstr "Posts"

Expand All @@ -129,19 +127,20 @@ msgstr "Start Over"
msgid "The page you are looking for does not exist."
msgstr "The page you are looking for does not exist."

#: src/routes/__root.tsx:147
#: src/routes/__root.tsx:153
msgid "This Route Does Not Exist"
msgstr "This Route Does Not Exist"

#: src/components/DefaultCatchBoundary.tsx:30
msgid "Try Again"
msgstr "Try Again"

#: src/routes/users.$userId.tsx:26
#: src/routes/users.$userId.tsx:28
#: src/routes/api/users.$id.ts:28
msgid "User not found"
msgstr "User not found"

#: src/routes/__root.tsx:122
#: src/routes/__root.tsx:128
msgid "Users"
msgstr "Users"

Expand Down
Loading