mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-06 01:15:42 +01:00
Merge branch 'analytics' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
9a5d18f38b
@ -61,7 +61,7 @@ if (trackerScriptName) {
|
|||||||
names.forEach(name => {
|
names.forEach(name => {
|
||||||
rewrites.push({
|
rewrites.push({
|
||||||
source: `/${name.replace(/^\/+/, '')}`,
|
source: `/${name.replace(/^\/+/, '')}`,
|
||||||
destination: '/script.js',
|
destination: '/tracker.js',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -163,6 +163,10 @@ const config = {
|
|||||||
async rewrites() {
|
async rewrites() {
|
||||||
return [
|
return [
|
||||||
...rewrites,
|
...rewrites,
|
||||||
|
{
|
||||||
|
source: '/script.js',
|
||||||
|
destination: 'https://tracker-script.umami.dev/',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
source: '/telemetry.js',
|
source: '/telemetry.js',
|
||||||
destination: '/api/scripts/telemetry',
|
destination: '/api/scripts/telemetry',
|
||||||
|
@ -5,7 +5,7 @@ import { terser } from 'rollup-plugin-terser';
|
|||||||
export default {
|
export default {
|
||||||
input: 'src/tracker/index.js',
|
input: 'src/tracker/index.js',
|
||||||
output: {
|
output: {
|
||||||
file: 'public/script.js',
|
file: 'public/tracker.js',
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Loading…
Reference in New Issue
Block a user