diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-07-24 12:20:49 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-07-24 12:20:49 +0300 |
commit | 5be3c07ebf228b5595d872a7733371fe59675443 (patch) | |
tree | 98b79d65c4742fde3dd467dc6a7818c2e5726fae /rollup.config.js | |
parent | Formatting wiht prettier (diff) | |
download | libredirect-5be3c07ebf228b5595d872a7733371fe59675443.zip |
Migrating UI to Svelte
Diffstat (limited to 'rollup.config.js')
-rw-r--r-- | rollup.config.js | 35 |
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, + }, +} |