mirror of
https://github.com/hanzoai/analytics.git
synced 2026-10-30 15:05:29 +00:00
The route tree moves from src/app/api to src/app/v1, and every caller moves with it: the dashboard's useApi base, the tracker and recorder collect paths, the Next headers and rewrites, the container middleware, the compose healthchecks and the Cypress API tests. The /v1/analytics alias is gone; /v1 is the one prefix. The build-time telemetry post to an upstream endpoint nothing serves is deleted. v1-surface.test.ts fails if src/app/api returns or any first-party file names an /api/ path. Claude-Session: https://claude.ai/code/session_011i2AG9nwpiKUCVxAdDzYuU
21 lines
525 B
JavaScript
21 lines
525 B
JavaScript
import 'dotenv/config';
|
|
import replace from '@rollup/plugin-replace';
|
|
import terser from '@rollup/plugin-terser';
|
|
|
|
export default {
|
|
input: 'src/tracker/index.js',
|
|
output: {
|
|
file: 'public/script.js',
|
|
format: 'iife',
|
|
},
|
|
plugins: [
|
|
replace({
|
|
__COLLECT_API_HOST__: process.env.COLLECT_API_HOST || '',
|
|
__COLLECT_API_ENDPOINT__: process.env.COLLECT_API_ENDPOINT || '/v1/send',
|
|
delimiters: ['', ''],
|
|
preventAssignment: true,
|
|
}),
|
|
terser({ compress: { evaluate: false } }),
|
|
],
|
|
};
|