mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
22 lines
524 B
JavaScript
22 lines
524 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/[id].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 } }),
|
|
],
|
|
};
|