Skip to content

Commit 3b451a5

Browse files
committed
update Plausible analytics configuration
1 parent ca6c913 commit 3b451a5

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

apps/dashboard/next.config.ts

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const ContentSecurityPolicy = `
1212
style-src 'self' 'unsafe-inline' vercel.live;
1313
font-src 'self' vercel.live assets.vercel.com framerusercontent.com fonts.gstatic.com;
1414
frame-src * data:;
15-
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com challenges.cloudflare.com;
15+
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com challenges.cloudflare.com pl.thirdweb.com;
1616
connect-src * data: blob:;
1717
worker-src 'self' blob:;
1818
block-all-mixed-content;
@@ -187,36 +187,30 @@ function getConfig(): NextConfig {
187187
const withBundleAnalyzer = require("@next/bundle-analyzer")({
188188
enabled: process.env.ANALYZE === "true",
189189
});
190-
// eslint-disable-next-line @typescript-eslint/no-var-requires
191-
const { withPlausibleProxy } = require("next-plausible");
190+
192191
// eslint-disable-next-line @typescript-eslint/no-var-requires
193192
const { withSentryConfig } = require("@sentry/nextjs");
194193
return withBundleAnalyzer(
195-
withPlausibleProxy({
196-
customDomain: "https://pl.thirdweb.com",
197-
scriptName: "pl",
198-
})(
199-
withSentryConfig(
200-
{
201-
...baseNextConfig,
202-
// @ts-expect-error - this is a valid option
203-
webpack: (config) => {
204-
if (config.cache) {
205-
config.cache = Object.freeze({
206-
type: "memory",
207-
});
208-
}
209-
config.externals.push("pino-pretty");
210-
config.module = {
211-
...config.module,
212-
exprContextCritical: false,
213-
};
214-
// Important: return the modified config
215-
return config;
216-
},
194+
withSentryConfig(
195+
{
196+
...baseNextConfig,
197+
// @ts-expect-error - this is a valid option
198+
webpack: (config) => {
199+
if (config.cache) {
200+
config.cache = Object.freeze({
201+
type: "memory",
202+
});
203+
}
204+
config.externals.push("pino-pretty");
205+
config.module = {
206+
...config.module,
207+
exprContextCritical: false,
208+
};
209+
// Important: return the modified config
210+
return config;
217211
},
218-
SENTRY_OPTIONS,
219-
),
212+
},
213+
SENTRY_OPTIONS,
220214
),
221215
);
222216
}

apps/dashboard/redirects.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ async function redirects() {
337337
destination: "/",
338338
permanent: false,
339339
},
340+
// plausible script redirect
341+
{
342+
source: "/js/pl.js",
343+
destination: "https://pl.thirdweb.com/js/script.js",
344+
permanent: false,
345+
},
340346
...legacyDashboardToTeamRedirects,
341347
];
342348
}

0 commit comments

Comments
 (0)