about summary refs log tree commit diff stats
path: root/rollup.config.js
blob: 71222de822e0eccc5d1d03b9fd6d80404aeec7a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import svelte from "rollup-plugin-svelte"
import commonjs from "@rollup/plugin-commonjs"
import terser from "@rollup/plugin-terser"
import resolve from "@rollup/plugin-node-resolve"
import css from "rollup-plugin-css-only"

const production = !process.env.ROLLUP_WATCH

export default {
  input: "src/pages/src/main.js",
  output: {
    sourcemap: true,
    format: "iife",
    name: "app",
    file: "src/pages/options/build/bundle.js",
  },
  plugins: [
    svelte({
      compilerOptions: {
        dev: !production,
      },
    }),
    css({ output: "bundle.css" }),
    resolve({
      browser: true,
      dedupe: ["svelte"],
      exportConditions: ["svelte"],
    }),
    commonjs(),
    // production && terser(),
  ],
  watch: {
    clearScreen: false,
  },
}