2020-07-17 10:03:38 +02:00
|
|
|
import 'dotenv/config';
|
2020-11-09 10:28:42 +01:00
|
|
|
import babel, { getBabelOutputPlugin } from '@rollup/plugin-babel';
|
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-11-09 10:28:42 +01:00
|
|
|
import commonjs from '@rollup/plugin-commonjs';
|
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: {
|
|
|
|
file: 'public/umami.js',
|
2020-11-09 10:28:42 +01:00
|
|
|
format: 'cjs',
|
|
|
|
plugins: [
|
|
|
|
getBabelOutputPlugin({
|
|
|
|
presets: ['@babel/preset-env'],
|
|
|
|
plugins: [['@babel/plugin-transform-runtime', { useESModules: true }]],
|
|
|
|
}),
|
|
|
|
],
|
2020-07-17 10:03:38 +02:00
|
|
|
},
|
2020-11-09 10:28:42 +01:00
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: 'bundled',
|
|
|
|
presets: ['@babel/preset-env'],
|
|
|
|
}),
|
|
|
|
|
|
|
|
buble({ objectAssign: true, target: { ie: 9 } }),
|
|
|
|
terser({ compress: { evaluate: false } }),
|
|
|
|
],
|
2020-07-17 10:03:38 +02:00
|
|
|
};
|