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: {
|
2023-03-16 00:27:05 +01:00
|
|
|
file: 'public/script.js',
|
2020-07-17 10:03:38 +02:00
|
|
|
format: 'iife',
|
|
|
|
},
|
2022-07-03 06:37:36 +02:00
|
|
|
plugins: [
|
|
|
|
replace({
|
2023-03-16 00:27:05 +01:00
|
|
|
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
|
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
|
|
|
};
|