Skip to content

Commit daa76d4

Browse files
configure plausible (#4)
1 parent e5f418f commit daa76d4

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

packages/nextjs/app/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { DotGothic16, Fira_Code, Press_Start_2P } from "next/font/google";
22
import "@rainbow-me/rainbowkit/styles.css";
33
import clsx from "clsx";
4+
import PlausibleProvider from "next-plausible";
45
import { ScaffoldEthApp } from "~~/components/ScaffoldEthApp";
56
import { ScaffoldEthAppProviders } from "~~/components/ScaffoldEthAppProviders";
67
import { ThemeProvider } from "~~/components/ThemeProvider";
@@ -26,6 +27,9 @@ const pressStart = Press_Start_2P({
2627
const Layout = ({ children }: { children: React.ReactNode }) => {
2728
return (
2829
<html suppressHydrationWarning className={clsx(firaCode.className, dotGothic.variable, pressStart.variable)}>
30+
<head>
31+
<PlausibleProvider domain="ctf.buidlguidl.com" />
32+
</head>
2933
<body className="bg-[url(/dot-texture.svg)]">
3034
<ThemeProvider enableSystem>
3135
<ScaffoldEthAppProviders>

packages/nextjs/next.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// @ts-check
2+
// eslint-disable-next-line @typescript-eslint/no-var-requires
3+
const { withPlausibleProxy } = require("next-plausible");
24

35
/** @type {import('next').NextConfig} */
4-
const nextConfig = {
6+
const nextConfig = withPlausibleProxy()({
57
reactStrictMode: true,
68
typescript: {
79
ignoreBuildErrors: process.env.NEXT_PUBLIC_IGNORE_BUILD_ERROR === "true",
@@ -14,6 +16,6 @@ const nextConfig = {
1416
config.externals.push("pino-pretty", "lokijs", "encoding");
1517
return config;
1618
},
17-
};
19+
});
1820

1921
module.exports = nextConfig;

packages/nextjs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"next": "~14.0.4",
2828
"next-mdx-remote": "^5.0.0",
2929
"next-nprogress-bar": "^2.3.13",
30+
"next-plausible": "^3.12.4",
3031
"next-themes": "~0.2.1",
3132
"qrcode.react": "~3.1.0",
3233
"react": "~18.2.0",

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,6 +3167,7 @@ __metadata:
31673167
next: ~14.0.4
31683168
next-mdx-remote: ^5.0.0
31693169
next-nprogress-bar: ^2.3.13
3170+
next-plausible: ^3.12.4
31703171
next-themes: ~0.2.1
31713172
postcss: ~8.4.16
31723173
prettier: ~2.8.4
@@ -13131,6 +13132,17 @@ __metadata:
1313113132
languageName: node
1313213133
linkType: hard
1313313134

13135+
"next-plausible@npm:^3.12.4":
13136+
version: 3.12.4
13137+
resolution: "next-plausible@npm:3.12.4"
13138+
peerDependencies:
13139+
next: "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 "
13140+
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
13141+
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
13142+
checksum: f8ae32eae3b8f4f45e1bdf1ab1aaf6be9ff184468c90253f4920a0cca01b426610c7ac85d082970e614f6f05b3679b9e68aae13ee5081a3d5bd003baaf11005a
13143+
languageName: node
13144+
linkType: hard
13145+
1313413146
"next-themes@npm:~0.2.1":
1313513147
version: 0.2.1
1313613148
resolution: "next-themes@npm:0.2.1"

0 commit comments

Comments
 (0)