This repository has been archived on 2021-11-08. You can view files and clone it, but cannot push or open issues or pull requests.
svelte-sharg/pwa.rollup.config.mjs
2021-10-05 12:53:14 +02:00

20 lines
509 B
JavaScript

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({ sourceMap: false, include: "**/service-worker.ts", lib: ["WebWorker"] }),
production && terser({ output: { comments: false } }),
],
watch: {
clearScreen: false,
},
};