Skip to content

Commit 58c0f23

Browse files
committed
feat: support configurable deployment basepath
1 parent 5acf92b commit 58c0f23

28 files changed

+2960
-3568
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module.exports = {
33
extends: [
44
require.resolve('@vercel/style-guide/eslint/browser'),
55
require.resolve('@vercel/style-guide/eslint/typescript'),
6-
require.resolve('@vercel/style-guide/eslint/jest'),
76
],
87
env: {
98
node: true,

apps/nextjs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
},
1111
"dependencies": {
1212
"@vercel/speed-insights": "workspace:*",
13-
"next": "15.0.1",
14-
"react": "19.0.0-rc-69d4b800-20241021",
15-
"react-dom": "19.0.0-rc-69d4b800-20241021"
13+
"next": "latest",
14+
"react": "latest",
15+
"react-dom": "latest"
1616
},
1717
"devDependencies": {
18-
"@playwright/test": "1.37.1"
18+
"@playwright/test": "1.49.0"
1919
}
2020
}

apps/nextjs/playwright.config.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

apps/remix/.eslintrc.cjs

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/remix/app/entry.client.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

apps/remix/app/entry.server.tsx

Lines changed: 0 additions & 137 deletions
This file was deleted.

apps/remix/app/root.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
import { cssBundleHref } from '@remix-run/css-bundle';
1+
// import { cssBundleHref } from '@remix-run/css-bundle';
22
import type { LinksFunction } from '@remix-run/node';
33
import {
44
Links,
5-
LiveReload,
65
Meta,
76
Outlet,
87
Scripts,
98
ScrollRestoration,
109
} from '@remix-run/react';
1110
import { SpeedInsights } from '@vercel/speed-insights/remix';
1211

13-
export const links: LinksFunction = () => [
14-
...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : []),
15-
];
12+
// export const links: LinksFunction = () => [
13+
// ...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : []),
14+
// ];
1615

17-
export default function App() {
16+
export function Layout({ children }: { children: React.ReactNode }) {
1817
return (
1918
<html lang="en">
2019
<head>
@@ -24,12 +23,15 @@ export default function App() {
2423
<Links />
2524
</head>
2625
<body>
27-
<Outlet />
26+
{children}
2827
<ScrollRestoration />
2928
<Scripts />
30-
<LiveReload />
3129
<SpeedInsights />
3230
</body>
3331
</html>
3432
);
3533
}
34+
35+
export default function App() {
36+
return <Outlet />;
37+
}

apps/remix/app/routes/_index.tsx

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
1-
import type { MetaFunction } from '@remix-run/node';
1+
import { Link } from '@remix-run/react';
22

3-
export const meta: MetaFunction = () => {
4-
return [
5-
{ title: 'New Remix App' },
6-
{ name: 'description', content: 'Welcome to Remix!' },
7-
];
8-
};
9-
10-
export default function Index() {
3+
export default function Home() {
114
return (
12-
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.8' }}>
13-
<h1>Welcome to Remix</h1>
14-
<ul>
15-
<li>
16-
<a
17-
target="_blank"
18-
href="https://remix.run/tutorials/blog"
19-
rel="noreferrer"
20-
>
21-
15m Quickstart Blog Tutorial
22-
</a>
23-
</li>
24-
<li>
25-
<a
26-
target="_blank"
27-
href="https://remix.run/tutorials/jokes"
28-
rel="noreferrer"
29-
>
30-
Deep Dive Jokes App Tutorial
31-
</a>
32-
</li>
33-
<li>
34-
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
35-
Remix Docs
36-
</a>
37-
</li>
38-
</ul>
39-
</div>
5+
<main>
6+
<h1>Speed Insights Demo</h1>
7+
<Link to="/blog/henri">About Henri</Link>
8+
<br />
9+
<Link to="/blog/bruno">About Bruno</Link>
10+
</main>
4011
);
4112
}
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
import { Link } from '@remix-run/react';
1+
import { json, type LoaderFunctionArgs } from '@remix-run/node';
2+
import { Link, useLoaderData } from '@remix-run/react';
3+
4+
export const loader = async ({ params }: LoaderFunctionArgs) => {
5+
return json({ slug: params.slug });
6+
};
27

38
export default function BlogPage() {
9+
const { slug } = useLoaderData<typeof loader>();
410
return (
511
<div>
612
<h1>Blog</h1>
7-
<p>Blog content goes here</p>
8-
<Link to="/blog/first">First post</Link>
9-
<Link to="/blog/second">First second</Link>
13+
<p>We don&apos;t talk about {slug}</p>
14+
<br />
15+
<Link to="/">Back</Link>
1016
</div>
1117
);
1218
}

apps/remix/package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,32 @@
44
"sideEffects": false,
55
"type": "module",
66
"scripts": {
7-
"build": "remix build",
8-
"dev": "remix dev --manual",
9-
"start": "remix-serve ./build/index.js",
7+
"build": "remix vite:build",
8+
"dev": "remix vite:dev",
9+
"start": "remix-serve ./build/server/index.js",
1010
"typecheck": "tsc"
1111
},
1212
"dependencies": {
13-
"@remix-run/css-bundle": "^2.5.0",
14-
"@remix-run/node": "^2.5.0",
15-
"@remix-run/react": "^2.5.0",
16-
"@remix-run/serve": "^2.5.0",
13+
"@remix-run/node": "latest",
14+
"@remix-run/react": "latest",
15+
"@remix-run/serve": "latest",
1716
"@vercel/speed-insights": "workspace:*",
18-
"isbot": "^3.6.8",
17+
"isbot": "^4.1.0",
1918
"react": "^18.2.0",
2019
"react-dom": "^18.2.0"
2120
},
2221
"devDependencies": {
23-
"@remix-run/dev": "^2.5.0",
24-
"@remix-run/eslint-config": "^2.5.0",
25-
"@types/react": "^18.2.48",
26-
"@types/react-dom": "^18.2.18",
27-
"eslint": "^8.56.0",
28-
"typescript": "^5.3.3"
22+
"@remix-run/dev": "latest",
23+
"@types/react": "^18.2.20",
24+
"@types/react-dom": "^18.2.7",
25+
"autoprefixer": "^10.4.19",
26+
"postcss": "^8.4.38",
27+
"tailwindcss": "^3.4.4",
28+
"typescript": "^5.1.6",
29+
"vite": "^5.1.0",
30+
"vite-tsconfig-paths": "^4.2.1"
2931
},
3032
"engines": {
31-
"node": ">=18.0.0"
33+
"node": ">=20.0.0"
3234
}
3335
}

0 commit comments

Comments
 (0)