2020-07-17 10:03:38 +02:00
|
|
|
import 'dotenv/config';
|
2020-07-18 04:15:29 +02:00
|
|
|
import buble from '@rollup/plugin-buble';
|
2020-07-25 02:00:56 +02:00
|
|
|
import resolve from '@rollup/plugin-node-resolve';
|
2020-07-18 04:15:29 +02:00
|
|
|
import { terser } from 'rollup-plugin-terser';
|
2020-07-17 10:03:38 +02:00
|
|
|
|
2022-02-16 06:03:09 +01:00
|
|
|
const scriptName = process.env.TRACKER_SCRIPT_NAME || 'umami';
|
|
|
|
|
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-16 06:03:09 +01:00
|
|
|
file: `public/${scriptName}.js`,
|
2020-07-17 10:03:38 +02:00
|
|
|
format: 'iife',
|
|
|
|
},
|
2020-10-01 00:14:44 +02:00
|
|
|
plugins: [resolve(), buble({ objectAssign: true }), terser({ compress: { evaluate: false } })],
|
2020-07-17 10:03:38 +02:00
|
|
|
};
|