umami/rollup.tracker.config.js

22 lines
524 B
JavaScript
Raw Normal View History

import 'dotenv/config';
2020-07-18 04:15:29 +02:00
import buble from '@rollup/plugin-buble';
import replace from '@rollup/plugin-replace';
2020-07-18 04:15:29 +02:00
import { terser } from 'rollup-plugin-terser';
2020-07-17 10:03:38 +02:00
export default {
input: 'tracker/[id].js',
2020-07-17 10:03:38 +02:00
output: {
file: 'public/script.js',
2020-07-17 10:03:38 +02:00
format: 'iife',
},
plugins: [
replace({
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
delimiters: ['', ''],
preventAssignment: true,
}),
buble({ objectAssign: true }),
terser({ compress: { evaluate: false } }),
],
2020-07-17 10:03:38 +02:00
};