diff --git a/next.config.mjs b/next.config.mjs index 36dd48d..e35c15d 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -31,4 +31,16 @@ export default withNextra({ }, ] }, + async rewrites() { + return [ + { + source: '/js/script.js', + destination: 'https://plausible.craftadoc.com/js/script.js' + }, + { + source: '/api/event', // Or '/api/event/' if you have `trailingSlash: true` in this config + destination: 'https://plausible.craftadoc.com/api/event' + } + ]; +}, }) \ No newline at end of file diff --git a/theme.config.jsx b/theme.config.jsx index 6c345fb..16a0912 100644 --- a/theme.config.jsx +++ b/theme.config.jsx @@ -34,6 +34,7 @@ export default { + ) // ... other theme options