2022-07-22 04:38:24 +02:00
|
|
|
import 'dotenv/config';
|
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 {
|
2023-08-21 11:06:09 +02:00
|
|
|
input: 'src/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
|
|
|
}),
|
|
|
|
terser({ compress: { evaluate: false } }),
|
|
|
|
],
|
2020-07-17 10:03:38 +02:00
|
|
|
};
|