mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-24 19:10:21 +01:00
21 lines
533 B
JavaScript
21 lines
533 B
JavaScript
import 'dotenv/config';
|
|
import replace from '@rollup/plugin-replace';
|
|
import { terser } from 'rollup-plugin-terser';
|
|
|
|
export default {
|
|
input: 'src/tracker/index.js',
|
|
output: {
|
|
file: 'public/script.js',
|
|
format: 'iife',
|
|
},
|
|
plugins: [
|
|
replace({
|
|
'__COLLECT_API_HOST__': process.env.COLLECT_API_HOST || '',
|
|
'__COLLECT_API_ENDPOINT__': process.env.COLLECT_API_ENDPOINT || '/api/send',
|
|
delimiters: ['', ''],
|
|
preventAssignment: true,
|
|
}),
|
|
terser({ compress: { evaluate: false } }),
|
|
],
|
|
};
|