2022-07-22 04:38:24 +02:00
|
|
|
import 'dotenv/config';
|
2020-07-18 04:15:29 +02:00
|
|
|
import buble from '@rollup/plugin-buble';
|
2022-07-03 06:37:36 +02:00
|
|
|
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 {
|
2020-07-24 07:07:57 +02:00
|
|
|
input: 'tracker/index.js',
|
2020-07-17 10:03:38 +02:00
|
|
|
output: {
|
2022-02-19 05:00:21 +01:00
|
|
|
file: 'public/umami.js',
|
2020-07-17 10:03:38 +02:00
|
|
|
format: 'iife',
|
|
|
|
},
|
2022-07-03 06:37:36 +02:00
|
|
|
plugins: [
|
|
|
|
replace({
|
2022-07-04 12:22:59 +02:00
|
|
|
'/api/collect': process.env.COLLECT_API_ENDPOINT || '/api/collect',
|
2022-07-03 06:37:36 +02:00
|
|
|
delimiters: ['', ''],
|
2022-07-22 04:38:24 +02:00
|
|
|
preventAssignment: true,
|
2022-07-03 06:37:36 +02:00
|
|
|
}),
|
|
|
|
buble({ objectAssign: true }),
|
|
|
|
terser({ compress: { evaluate: false } }),
|
|
|
|
],
|
2020-07-17 10:03:38 +02:00
|
|
|
};
|