17 lines
460 B
JavaScript
17 lines
460 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({ tsconfig: "src/pwa/tsconfig.json" }), production && terser({ output: { comments: false } })],
|
|
watch: {
|
|
clearScreen: false,
|
|
},
|
|
};
|