Skip to content

Commit

Permalink
Changed tracker script name.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Oct 16, 2024
1 parent 438eb4b commit 8a59bb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (trackerScriptName) {
names.forEach(name => {
rewrites.push({
source: `/${name.replace(/^\/+/, '')}`,
destination: '/script.js',
destination: '/tracker.js',
});
});
}
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion rollup.tracker.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 8a59bb0

Please sign in to comment.