21 lines
509 B
JavaScript
21 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,
|
||
|
},
|
||
|
};
|