We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d1eda5 commit cfabb7dCopy full SHA for cfabb7d
packages/analytics/src/plugin/with-simple-analytics.ts
@@ -48,17 +48,21 @@ export function withSimpleAnalytics(
48
const nextAnalyticsConfig: NextConfig = {
49
async rewrites() {
50
const existingRewrites = await nextConfig.rewrites?.();
51
+ const basePath = !nextConfig.basePath;
52
53
const rewrites = [
54
{
55
+ basePath,
56
source: "/proxy.js",
57
destination: `https://simpleanalyticsexternal.com/proxy.js?hostname=${hostname}&path=/simple`,
58
},
59
60
61
source: "/auto-events.js",
62
destination: "https://scripts.simpleanalyticscdn.com/auto-events.js",
63
64
65
66
source: "/simple/:match*",
67
destination: "https://queue.simpleanalyticscdn.com/:match*",
68
0 commit comments