Skip to content

Commit

Permalink
make build work with latest vinxi (#189)
Browse files Browse the repository at this point in the history
Co-authored-by: Tanner Linsley <[email protected]>
  • Loading branch information
nksaraf and tannerlinsley committed Mar 13, 2024
1 parent 01b1e57 commit f4c9f66
Show file tree
Hide file tree
Showing 6 changed files with 1,307 additions and 131 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ yarn.lock
/api/
/server/build
/public/build
.vinxi
33 changes: 18 additions & 15 deletions app.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const resolveToRelative = (p) => {
}

const customVite = () =>
config('dev', {
config('dev', (router, app, env) => ({
// ssr: {
// noExternal: [/react-router-server\/dist\/esm\/server-runtime/],
// },
Expand All @@ -34,19 +34,22 @@ const customVite = () =>
'react-icons',
],
},
// resolve: {
// dedupe: [
// 'react',
// 'react-dom',
// '@tanstack/store',
// '@tanstack/react-store',
// '@tanstack/react-router',
// '@tanstack/react-router-server',
// '@tanstack/react-cross-context',
// '@tanstack/history',
// 'use-sync-external-store',
// ],
// },
resolve:
env.command !== 'build'
? {
dedupe: [
'react',
'react-dom',
'@tanstack/store',
'@tanstack/react-store',
'@tanstack/react-router',
'@tanstack/react-router-server',
'@tanstack/react-cross-context',
'@tanstack/history',
'use-sync-external-store',
],
}
: {},
// plugins: [
// {
// name: 'inline-env-vars-as-prefix',
Expand All @@ -55,7 +58,7 @@ const customVite = () =>
// intro: `(globalThis || window).ROUTER_NAME = import.meta.env.ROUTER_NAME`,
// },
// ],
})
}))

export default createApp({
routers: [
Expand Down
3 changes: 2 additions & 1 deletion app/components/DocsLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DocSearch } from '@docsearch/react'
import * as pkg from '@docsearch/react'
const { DocSearch } = pkg
import * as React from 'react'
import { CgClose, CgMenuLeft } from 'react-icons/cg'
import {
Expand Down
3 changes: 2 additions & 1 deletion app/components/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DocSearch } from '@docsearch/react'
import * as pkg from '@docsearch/react'
const { DocSearch } = pkg
import type { DocSearchProps } from '@docsearch/react'

export function Search(props: DocSearchProps) {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": "https://github.com/TanStack/tanstack.com.git",
"packageManager": "[email protected]",
"scripts": {
"dev": "vinxi dev --experimental-import-meta-resolve",
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"lint": "prettier --check '**/*' --ignore-unknown && eslint --ext .ts,.tsx ./app",
Expand All @@ -19,10 +19,10 @@
"@octokit/graphql": "^7.0.2",
"@octokit/rest": "^20.0.2",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-router": "1.18.4",
"@tanstack/react-router-server": "1.18.4",
"@tanstack/router-devtools": "^1.17.0",
"@tanstack/router-vite-plugin": "1.18.1",
"@tanstack/react-router": "1.15.16",
"@tanstack/react-router-server": "1.15.16",
"@tanstack/router-devtools": "1.15.16",
"@tanstack/router-vite-plugin": "1.15.11",
"@vinxi/react": "0.2.2",
"@vinxi/server-functions": "^0.3.1",
"@visx/hierarchy": "^2.10.0",
Expand All @@ -47,8 +47,8 @@
"remark-gfm": "^1.0.0",
"remove-markdown": "^0.5.0",
"tailwind-merge": "^1.14.0",
"vinxi": "0.3.8",
"tiny-invariant": "^1.3.3",
"vinxi": "0.2.1",
"vite": "^5.1.4",
"vite-tsconfig-paths": "^4.3.1",
"zod": "^3.22.4",
Expand Down
Loading

0 comments on commit f4c9f66

Please sign in to comment.