umami/rollup.tracker.config.js
2023-05-20 09:02:08 -07:00

22 lines
530 B
JavaScript

import 'dotenv/config';
import buble from '@rollup/plugin-buble';
import replace from '@rollup/plugin-replace';
import { terser } from 'rollup-plugin-terser';
export default {
input: 'tracker/event-data.js',
output: {
file: 'public/script.js',
format: 'iife',
},
plugins: [
replace({
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
delimiters: ['', ''],
preventAssignment: true,
}),
buble({ objectAssign: true }),
terser({ compress: { evaluate: false } }),
],
};