umami/rollup.config.js

22 lines
529 B
JavaScript
Raw Normal View History

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';
import replace from '@rollup/plugin-replace';
2020-07-17 10:03:38 +02:00
import { nodeResolve } 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
export default {
input: 'scripts/umami/index.js',
output: {
file: 'public/umami.js',
format: 'iife',
},
plugins: [
replace({
'process.env.UMAMI_URL': JSON.stringify(process.env.UMAMI_URL),
}),
2020-07-18 04:15:29 +02:00
nodeResolve(),
buble(),
terser({ compress: { evaluate: false } }),
2020-07-17 10:03:38 +02:00
],
};