Skip to content
Open
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
46 changes: 44 additions & 2 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@tabler/icons-react": "^3.46.0",
"@vercel/analytics": "2.0.1",
"@vitejs/plugin-react": "5.0.4",
"react": "19.2.0",
"react-dom": "19.2.0",
Expand Down
2 changes: 2 additions & 0 deletions website/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { Analytics } from "@vercel/analytics/react";
import { App } from "./App.jsx";
import { I18nProvider } from "./I18n.jsx";
import "./styles.css";
Expand All @@ -8,6 +9,7 @@ createRoot(document.getElementById("root")).render(
<React.StrictMode>
<I18nProvider>
<App />
<Analytics />
</I18nProvider>
</React.StrictMode>,
);
8 changes: 8 additions & 0 deletions website/tests/sites-worker.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ test("ships complete share metadata for every public page", async () => {
}
});

test("includes the Vercel Web Analytics beacon in the client bundle", async () => {
const html = await readFile(new URL("../dist/client/index.html", import.meta.url), "utf8");
const script = html.match(/src="(\/assets\/index-[^"]+\.js)"/);
assert.ok(script, "client bundle script tag");
const js = await readFile(new URL(`../dist/client${script[1]}`, import.meta.url), "utf8");
assert.ok(js.includes("/_vercel/insights/script.js"));
});

test("ships the exact 1200 by 630 social card and crawler files", async () => {
const png = await readFile(new URL("../dist/client/og.png", import.meta.url));
assert.equal(png.subarray(1, 4).toString(), "PNG");
Expand Down
Loading