12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // import { resolve } from "path";
- import svelte from "rollup-plugin-svelte";
- import externals from "rollup-plugin-node-externals";
- import css from "rollup-plugin-css-only";
- import sveltePreprocess from "svelte-preprocess";
- // import alias from '@rollup/plugin-alias';
- import typescript from '@rollup/plugin-typescript';
- import { VERSION } from "./src/version";
- import commonjs from "@rollup/plugin-commonjs";
- const production = !process.env.ROLLUP_WATCH
- export default [
- {
- input: [
- "src/repo_worker.ts",
- "src/rollup_worker.ts",
- "src/preload.ts",
- "src/main.ts",
- "src/index.ts",
- "src/stores.ts",
- ],
- output: [
- {
- sourcemap: !VERSION.production,
- dir: "build",
- format: "cjs",
- },
- ],
- plugins: [
- typescript({ sourceMap: !production }),
- svelte({
- preprocess: [
- sveltePreprocess({ sourceMap: !production, }),
- ],
- }),
- externals({ deps: true }),
- css({ output: "bundle.css" }),
- commonjs({include: ["/Users/zorro/entwicklung/SVWS-Server/svws-ts-lib/src/main/ts/"]})
- // alias({
- // entries: [
- // { find: '@svws-nrw/svws-ts-lib', replacement: resolve(__dirname, "../SVWS-Server/svws-ts-lib/src/main/ts") },
- // ]
- // })
- ],
- onwarn(warning, warn) {
- if (warning.code === "CIRCULAR_DEPENDENCY") return;
- warn(warning);
- },
- },
- ];
|