diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-07-25 15:17:57 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-07-25 15:17:57 +0300 |
commit | c6de68c4c4bda3edcf6cf012bd98adea3baf866b (patch) | |
tree | 419e5cb8cdfe04fd734c5590e78888fa16e58e51 /rollup.config.js | |
parent | Made Select Frontend searchable and with icons (diff) | |
download | libredirect-c6de68c4c4bda3edcf6cf012bd98adea3baf866b.zip |
Migrating popup to svelte
Diffstat (limited to 'rollup.config.js')
-rw-r--r-- | rollup.config.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/rollup.config.js b/rollup.config.js index 71222de8..5a2ce362 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,14 +5,23 @@ import resolve from "@rollup/plugin-node-resolve" import css from "rollup-plugin-css-only" const production = !process.env.ROLLUP_WATCH +let input +let output +if (process.argv.includes("--config-options")) { + input = "src/pages/options_src/main.js" + output = "src/pages/options/build/bundle.js" +} else if (process.argv.includes("--config-popup")) { + input = "src/pages/popup_src/main.js" + output = "src/pages/popup/build/bundle.js" +} export default { - input: "src/pages/src/main.js", + input, output: { sourcemap: true, format: "iife", name: "app", - file: "src/pages/options/build/bundle.js", + file: output, }, plugins: [ svelte({ @@ -27,7 +36,7 @@ export default { exportConditions: ["svelte"], }), commonjs(), - // production && terser(), + production && terser(), ], watch: { clearScreen: false, |