import typescript from 'rollup-plugin-typescript2'; import commonjs from 'rollup-plugin-commonjs'; import nodeResolve from 'rollup-plugin-node-resolve'; import { terser } from 'rollup-plugin-terser'; import json from '@rollup/plugin-json'; const dev = process.env.ROLLUP_WATCH; const plugins = [ nodeResolve({ jsnext: true, preferBuiltins: true, browser: true }), commonjs(), typescript(), json(), !dev && terser() ]; export default [ { input: 'src/plex-meets-homeassistant.ts', output: { dir: 'dist', format: 'es' }, plugins: [...plugins] } ];