import typescript from "@rollup/plugin-typescript"; import { terser } from "rollup-plugin-terser"; const production = !process.env.ROLLUP_WATCH; export default { input: "src/pwa/service-worker.ts", output: { file: "public/service-worker.js", preferConst: true, strict: true, }, plugins: [typescript({ tsconfig: "src/pwa/tsconfig.json" }), production && terser({ output: { comments: false } })], watch: { clearScreen: false, }, };