Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2,142 changes: 1,045 additions & 1,097 deletions bun.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"@tanstack/react-form": "^1.15.2",
"@tanstack/react-pacer": "^0.11.0",
"@tanstack/react-query": "^5.84.1",
"@tanstack/react-router": "1.125.3",
"@tanstack/react-router-with-query": "1.125.3",
"@tanstack/react-start": "1.125.3",
"@tanstack/zod-adapter": "^1.130.11",
"@tanstack/react-router": "1.127.3",
"@tanstack/react-router-with-query": "1.127.3",
"@tanstack/react-start": "1.127.3",
"@tanstack/zod-adapter": "^1.127.3",
"ai": "^4.3.19",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand All @@ -56,8 +56,8 @@
},
"devDependencies": {
"@tanstack/react-query-devtools": "^5.84.1",
"@tanstack/react-router-devtools": "^1.130.11",
"@tanstack/router-plugin": "^1.130.11",
"@tanstack/react-router-devtools": "^1.127.3",
"@tanstack/router-plugin": "^1.127.3",
"@testing-library/jest-dom": "^6.6.4",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
Expand Down
32 changes: 32 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Commandly</title>
<script type="text/javascript">
var pathSegmentsToKeep = 0;

var l = window.location;
l.replace(
l.protocol +
"//" +
l.hostname +
(l.port ? ":" + l.port : "") +
l.pathname
.split("/")
.slice(0, 1 + pathSegmentsToKeep)
.join("/") +
"/?/" +
l.pathname
.slice(1)
.split("/")
.slice(pathSegmentsToKeep)
.join("/")
.replace(/&/g, "~and~") +
(l.search ? "&" + l.search.slice(1).replace(/&/g, "~and~") : "") +
l.hash
);
</script>
</head>
<body></body>
</html>
16 changes: 16 additions & 0 deletions public/spa-redirect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function (l) {
if (l.search[1] === "/") {
var decoded = l.search
.slice(1)
.split("&")
.map(function (s) {
return s.replace(/~and~/g, "&");
})
.join("?");
window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
})(window.location);
1 change: 1 addition & 0 deletions src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ function RootDocument({ children }: { children: React.ReactNode }) {
return (
<html suppressHydrationWarning={true}>
<head>
<script src="/spa-redirect.js"></script>
<HeadContent />
</head>
<body className="bg-background text-foreground antialiased">
Expand Down
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
export default defineConfig({
build: {
emptyOutDir: true
Expand All @@ -10,6 +11,7 @@ export default defineConfig({
projects: ["./tsconfig.json"]
}),
tanstackStart({
customViteReactPlugin: true,
pages: [
{
path: "/",
Expand Down Expand Up @@ -37,7 +39,8 @@ export default defineConfig({
}
},
target: "github-pages"
})
}),
viteReact()
],
server: {
port: 4001
Expand Down
Loading