aboutsummaryrefslogtreecommitdiffstats
path: root/rollup.config.js
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2024-07-24 12:20:49 +0300
committerManeraKai <manerakai@protonmail.com>2024-07-24 12:20:49 +0300
commit5be3c07ebf228b5595d872a7733371fe59675443 (patch)
tree98b79d65c4742fde3dd467dc6a7818c2e5726fae /rollup.config.js
parentFormatting wiht prettier (diff)
downloadlibredirect-5be3c07ebf228b5595d872a7733371fe59675443.zip
Migrating UI to Svelte
Diffstat (limited to 'rollup.config.js')
-rw-r--r--rollup.config.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 00000000..71222de8
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,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,
+ },
+}