From 8a59bb0edff5825674e68cb71acd5493442038a2 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 15 Oct 2024 21:31:05 -0700 Subject: [PATCH] Changed tracker script name. --- next.config.js | 6 +++++- rollup.tracker.config.mjs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/next.config.js b/next.config.js index b610eb2c83..cc295c8997 100644 --- a/next.config.js +++ b/next.config.js @@ -61,7 +61,7 @@ if (trackerScriptName) { names.forEach(name => { rewrites.push({ source: `/${name.replace(/^\/+/, '')}`, - destination: '/script.js', + destination: '/tracker.js', }); }); } @@ -163,6 +163,10 @@ const config = { async rewrites() { return [ ...rewrites, + { + source: '/script.js', + destination: 'https://tracker-script.umami.dev/', + }, { source: '/telemetry.js', destination: '/api/scripts/telemetry', diff --git a/rollup.tracker.config.mjs b/rollup.tracker.config.mjs index 05df28798d..4b1f0e0e25 100644 --- a/rollup.tracker.config.mjs +++ b/rollup.tracker.config.mjs @@ -5,7 +5,7 @@ import { terser } from 'rollup-plugin-terser'; export default { input: 'src/tracker/index.js', output: { - file: 'public/script.js', + file: 'public/tracker.js', format: 'iife', }, plugins: [